summaryrefslogtreecommitdiff
path: root/Source/Platform/chromium/public
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Platform/chromium/public')
-rw-r--r--Source/Platform/chromium/public/WebAnimation.h48
-rw-r--r--Source/Platform/chromium/public/WebBlobData.h7
-rw-r--r--Source/Platform/chromium/public/WebContentLayer.h36
-rw-r--r--Source/Platform/chromium/public/WebExternalTextureLayer.h34
-rw-r--r--Source/Platform/chromium/public/WebFilterOperation.h18
-rw-r--r--Source/Platform/chromium/public/WebGraphicsContext3D.h5
-rw-r--r--Source/Platform/chromium/public/WebHTTPBody.h8
-rw-r--r--Source/Platform/chromium/public/WebIOSurfaceLayer.h18
-rw-r--r--Source/Platform/chromium/public/WebImageLayer.h16
-rw-r--r--Source/Platform/chromium/public/WebLayer.h193
-rw-r--r--Source/Platform/chromium/public/WebScrollableLayer.h64
-rw-r--r--Source/Platform/chromium/public/WebScrollbarLayer.h19
-rw-r--r--Source/Platform/chromium/public/WebSolidColorLayer.h17
-rw-r--r--Source/Platform/chromium/public/WebVideoLayer.h17
14 files changed, 169 insertions, 331 deletions
diff --git a/Source/Platform/chromium/public/WebAnimation.h b/Source/Platform/chromium/public/WebAnimation.h
index 0db98ad35..238bbaae1 100644
--- a/Source/Platform/chromium/public/WebAnimation.h
+++ b/Source/Platform/chromium/public/WebAnimation.h
@@ -42,60 +42,40 @@ namespace WebKit {
class WebAnimationCurve;
// A compositor driven animation.
-class WebAnimation : public WebNonCopyable {
+class WebAnimation {
public:
enum TargetProperty {
TargetPropertyTransform = 0,
TargetPropertyOpacity
};
- WebAnimation(const WebAnimationCurve& curve, TargetProperty targetProperty)
- {
- initialize(curve, targetProperty);
- }
+ // The caller takes ownership of the returned valuev
+ WEBKIT_EXPORT static WebAnimation* create(const WebAnimationCurve&, TargetProperty);
// An animationId is effectively the animation's name, and it is not unique.
// Animations with the same groupId are run at the same time. An animation
// may be uniquely identified by a combination of groupId and target property.
- WebAnimation(const WebAnimationCurve& curve, int animationId, int groupId, TargetProperty targetProperty)
- {
- initialize(curve, animationId, groupId, targetProperty);
- }
+ WEBKIT_EXPORT static WebAnimation* create(const WebAnimationCurve&, int animationId, int groupId, TargetProperty);
- ~WebAnimation()
- {
- destroy();
- }
+ virtual ~WebAnimation() { }
- WEBKIT_EXPORT TargetProperty targetProperty() const;
+ virtual TargetProperty targetProperty() const = 0;
// This is the number of times that the animation will play. If this
// value is zero the animation will not play. If it is negative, then
// the animation will loop indefinitely.
- WEBKIT_EXPORT int iterations() const;
- WEBKIT_EXPORT void setIterations(int);
+ virtual int iterations() const = 0;
+ virtual void setIterations(int) = 0;
- WEBKIT_EXPORT double startTime() const;
- WEBKIT_EXPORT void setStartTime(double monotonicTime);
- WEBKIT_EXPORT bool hasSetStartTime() const;
+ virtual double startTime() const = 0;
+ virtual void setStartTime(double monotonicTime) = 0;
- WEBKIT_EXPORT double timeOffset() const;
- WEBKIT_EXPORT void setTimeOffset(double monotonicTime);
+ virtual double timeOffset() const = 0;
+ virtual void setTimeOffset(double monotonicTime) = 0;
// If alternatesDirection is true, on odd numbered iterations we reverse the curve.
- WEBKIT_EXPORT bool alternatesDirection() const;
- WEBKIT_EXPORT void setAlternatesDirection(bool);
-
-#if WEBKIT_IMPLEMENTATION
- operator PassOwnPtr<WebCore::CCActiveAnimation>() const;
-#endif
-
-private:
- WEBKIT_EXPORT void initialize(const WebAnimationCurve&, TargetProperty);
- WEBKIT_EXPORT void initialize(const WebAnimationCurve&, int animationId, int groupId, TargetProperty);
- WEBKIT_EXPORT void destroy();
-
- WebPrivateOwnPtr<WebCore::CCActiveAnimation> m_private;
+ virtual bool alternatesDirection() const = 0;
+ virtual void setAlternatesDirection(bool) = 0;
};
} // namespace WebKit
diff --git a/Source/Platform/chromium/public/WebBlobData.h b/Source/Platform/chromium/public/WebBlobData.h
index 7fa32d3b6..47d9132e7 100644
--- a/Source/Platform/chromium/public/WebBlobData.h
+++ b/Source/Platform/chromium/public/WebBlobData.h
@@ -47,13 +47,16 @@ class WebBlobDataPrivate;
class WebBlobData {
public:
struct Item {
- enum { TypeData, TypeFile, TypeBlob } type;
+ enum { TypeData, TypeFile, TypeBlob, TypeURL } type;
WebThreadSafeData data;
WebString filePath;
- WebURL blobURL;
+ WebURL url; // For TypeBlob or TypeURL.
long long offset;
long long length; // -1 means go to the end of the file/blob.
double expectedModificationTime; // 0.0 means that the time is not set.
+
+ // FIXME: deprecate this.
+ WebURL blobURL;
};
~WebBlobData() { reset(); }
diff --git a/Source/Platform/chromium/public/WebContentLayer.h b/Source/Platform/chromium/public/WebContentLayer.h
index 7336bfabc..312107f9c 100644
--- a/Source/Platform/chromium/public/WebContentLayer.h
+++ b/Source/Platform/chromium/public/WebContentLayer.h
@@ -27,55 +27,37 @@
#define WebContentLayer_h
#include "WebCommon.h"
-#include "WebScrollableLayer.h"
-
-namespace WebCore {
-class ContentLayerChromium;
-}
namespace WebKit {
class WebContentLayerClient;
-class WebContentLayerImpl;
-class WebContentLayer : public WebScrollableLayer {
+class WebContentLayer {
public:
- WEBKIT_EXPORT static WebContentLayer create(WebContentLayerClient*);
+ // The client must outlive the WebContentLayer.
+ WEBKIT_EXPORT static WebContentLayer* create(WebContentLayerClient*);
- WebContentLayer() { }
- WebContentLayer(const WebContentLayer& layer) : WebScrollableLayer(layer) { }
virtual ~WebContentLayer() { }
- WebContentLayer& operator=(const WebContentLayer& layer)
- {
- WebLayer::assign(layer);
- return *this;
- }
- // Called when the WebContentLayerClient is going away and should not be used.
- WEBKIT_EXPORT void clearClient();
+ // The WebContentLayer has ownership of this wrapper.
+ virtual WebLayer* layer() = 0;
// Set to true if the backside of this layer's contents should be visible when composited.
// Defaults to false.
- WEBKIT_EXPORT void setDoubleSided(bool);
+ virtual void setDoubleSided(bool) = 0;
// Set to apply a scale factor used when painting and drawing this layer's content. Defaults to 1.0.
- WEBKIT_EXPORT void setContentsScale(float);
+ virtual void setContentsScale(float) = 0;
// Set to render text in this layer with LCD antialiasing. Only set if you know that this layer will be
// drawn in a way where this makes sense - i.e. opaque background, not rotated or scaled, etc.
// Defaults to false;
- WEBKIT_EXPORT void setUseLCDText(bool);
+ virtual void setUseLCDText(bool) = 0;
// Set to draw a system-defined checkerboard if the compositor would otherwise draw a tile in this layer
// and the actual contents are unavailable. If false, the compositor will draw the layer's background color
// for these tiles.
// Defaults to false.
- WEBKIT_EXPORT void setDrawCheckerboardForMissingTiles(bool);
-
-#if WEBKIT_IMPLEMENTATION
- WebContentLayer(const WTF::PassRefPtr<WebCore::ContentLayerChromium>&);
- WebContentLayer& operator=(const WTF::PassRefPtr<WebCore::ContentLayerChromium>&);
- operator WTF::PassRefPtr<WebCore::ContentLayerChromium>() const;
-#endif
+ virtual void setDrawCheckerboardForMissingTiles(bool) = 0;
};
} // namespace WebKit
diff --git a/Source/Platform/chromium/public/WebExternalTextureLayer.h b/Source/Platform/chromium/public/WebExternalTextureLayer.h
index b19c05f3e..92d2c4fee 100644
--- a/Source/Platform/chromium/public/WebExternalTextureLayer.h
+++ b/Source/Platform/chromium/public/WebExternalTextureLayer.h
@@ -30,10 +30,6 @@
#include "WebFloatRect.h"
#include "WebLayer.h"
-namespace WebCore {
-class TextureLayerChromium;
-}
-
namespace WebKit {
class WebExternalTextureLayerClient;
@@ -44,49 +40,43 @@ class WebExternalTextureLayerClient;
// When in single-thread mode, this means during WebLayerTreeView::composite().
// When using the threaded compositor, this can mean at an arbitrary time until
// the WebLayerTreeView is destroyed.
-class WebExternalTextureLayer : public WebLayer {
+class WebExternalTextureLayer {
public:
// The owner of this layer may optionally provide a client. This client will
// be called whenever the compositor wishes to produce a new frame and can
// provide a new front buffer texture ID. This is useful if the client wants to
// implement a double-buffering scheme that is synchronized with the compositor, for instance.
- WEBKIT_EXPORT static WebExternalTextureLayer create(WebExternalTextureLayerClient* = 0);
-
- // Indicates that the client for this layer is going away and shouldn't be used.
- WEBKIT_EXPORT void clearClient();
+ // The client must outlive the WebExternalTextureLayer.
+ WEBKIT_EXPORT static WebExternalTextureLayer* create(WebExternalTextureLayerClient* = 0);
- WebExternalTextureLayer() { }
virtual ~WebExternalTextureLayer() { }
+ virtual WebLayer* layer() = 0;
+
// Sets the texture id that represents the layer, in the namespace of the
// compositor context.
- WEBKIT_EXPORT void setTextureId(unsigned);
+ virtual void setTextureId(unsigned) = 0;
// Sets whether or not the texture should be flipped in the Y direction when
// rendered.
- WEBKIT_EXPORT void setFlipped(bool);
+ virtual void setFlipped(bool) = 0;
// Sets the rect in UV space of the texture that is mapped to the layer
// bounds.
- WEBKIT_EXPORT void setUVRect(const WebFloatRect&);
+ virtual void setUVRect(const WebFloatRect&) = 0;
// Sets whether every pixel in this layer is opaque. Defaults to false.
- WEBKIT_EXPORT void setOpaque(bool);
+ virtual void setOpaque(bool) = 0;
// Sets whether this layer's texture has premultiplied alpha or not. Defaults to true.
- WEBKIT_EXPORT void setPremultipliedAlpha(bool);
+ virtual void setPremultipliedAlpha(bool) = 0;
// Indicates that the most recently provided texture ID is about to be modified externally.
- WEBKIT_EXPORT void willModifyTexture();
+ virtual void willModifyTexture() = 0;
// Sets whether this context should be rate limited by the compositor. Rate limiting works by blocking
// invalidate() and invalidateRect() calls if the compositor is too many frames behind.
- WEBKIT_EXPORT void setRateLimitContext(bool);
-
-private:
-#if WEBKIT_IMPLEMENTATION
- explicit WebExternalTextureLayer(PassRefPtr<WebCore::TextureLayerChromium>);
-#endif
+ virtual void setRateLimitContext(bool) = 0;
};
} // namespace WebKit
diff --git a/Source/Platform/chromium/public/WebFilterOperation.h b/Source/Platform/chromium/public/WebFilterOperation.h
index 851a7b9d4..a8d0ec25b 100644
--- a/Source/Platform/chromium/public/WebFilterOperation.h
+++ b/Source/Platform/chromium/public/WebFilterOperation.h
@@ -30,6 +30,7 @@
#include "WebCommon.h"
#include "WebColor.h"
#include "WebPoint.h"
+#include "WebRect.h"
namespace WebKit {
@@ -47,6 +48,7 @@ public:
FilterTypeBlur,
FilterTypeDropShadow,
FilterTypeColorMatrix,
+ FilterTypeZoom,
};
FilterType type() const { return m_type; }
@@ -70,6 +72,12 @@ public:
return m_matrix;
}
+ WebRect zoomRect() const
+ {
+ WEBKIT_ASSERT(m_type == FilterTypeZoom);
+ return WebRect(m_zoomRect);
+ }
+
#define WEBKIT_HAS_NEW_WEBFILTEROPERATION_API 1
static WebFilterOperation createGrayscaleFilter(float amount) { return WebFilterOperation(FilterTypeGrayscale, amount); }
static WebFilterOperation createSepiaFilter(float amount) { return WebFilterOperation(FilterTypeSepia, amount); }
@@ -82,6 +90,7 @@ public:
static WebFilterOperation createBlurFilter(float amount) { return WebFilterOperation(FilterTypeBlur, amount); }
static WebFilterOperation createDropShadowFilter(WebPoint offset, float stdDeviation, WebColor color) { return WebFilterOperation(FilterTypeDropShadow, offset, stdDeviation, color); }
static WebFilterOperation createColorMatrixFilter(SkScalar matrix[20]) { return WebFilterOperation(FilterTypeColorMatrix, matrix); }
+ static WebFilterOperation createZoomFilter(WebRect rect, int inset) { return WebFilterOperation(FilterTypeZoom, rect, inset); }
bool equals(const WebFilterOperation& other) const;
@@ -92,6 +101,7 @@ private:
WebPoint m_dropShadowOffset;
WebColor m_dropShadowColor;
SkScalar m_matrix[20];
+ WebRect m_zoomRect;
WebFilterOperation(FilterType type, float amount)
{
@@ -111,6 +121,14 @@ private:
}
WebFilterOperation(FilterType, SkScalar matrix[20]);
+
+ WebFilterOperation(FilterType type, WebRect rect, float inset)
+ {
+ WEBKIT_ASSERT(type == FilterTypeZoom);
+ m_type = type;
+ m_amount = inset;
+ m_zoomRect = rect;
+ }
};
inline bool operator==(const WebFilterOperation& a, const WebFilterOperation& b)
diff --git a/Source/Platform/chromium/public/WebGraphicsContext3D.h b/Source/Platform/chromium/public/WebGraphicsContext3D.h
index c0f790b8a..312d4fab7 100644
--- a/Source/Platform/chromium/public/WebGraphicsContext3D.h
+++ b/Source/Platform/chromium/public/WebGraphicsContext3D.h
@@ -438,6 +438,11 @@ public:
virtual void produceTextureCHROMIUM(WGC3Denum target, const WGC3Dbyte* mailbox) { }
virtual void consumeTextureCHROMIUM(WGC3Denum target, const WGC3Dbyte* mailbox) { }
+ // GL_EXT_debug_marker
+ virtual void insertEventMarkerEXT(const WGC3Dchar* marker) { }
+ virtual void pushGroupMarkerEXT(const WGC3Dchar* marker) { }
+ virtual void popGroupMarkerEXT(void) { }
+
GrGLInterface* createGrGLInterface();
protected:
diff --git a/Source/Platform/chromium/public/WebHTTPBody.h b/Source/Platform/chromium/public/WebHTTPBody.h
index 5c638602a..13bf5fed1 100644
--- a/Source/Platform/chromium/public/WebHTTPBody.h
+++ b/Source/Platform/chromium/public/WebHTTPBody.h
@@ -48,12 +48,15 @@ class WebHTTPBodyPrivate;
class WebHTTPBody {
public:
struct Element {
- enum Type { TypeData, TypeFile, TypeBlob } type;
+ enum Type { TypeData, TypeFile, TypeBlob, TypeURL } type;
WebData data;
WebString filePath;
long long fileStart;
long long fileLength; // -1 means to the end of the file.
double modificationTime;
+ WebURL url; // For TypeBlob or TypeURL.
+
+ // FIXME: deprecate this.
WebURL blobURL;
};
@@ -87,6 +90,9 @@ public:
WEBKIT_EXPORT void appendFileRange(const WebString&, long long fileStart, long long fileLength, double modificationTime);
WEBKIT_EXPORT void appendBlob(const WebURL&);
+ // Append a resource which is identified by URL. Currently we only support FileSystem URL.
+ WEBKIT_EXPORT void appendURLRange(const WebURL&, long long start, long long length, double modificationTime);
+
// Identifies a particular form submission instance. A value of 0 is
// used to indicate an unspecified identifier.
WEBKIT_EXPORT long long identifier() const;
diff --git a/Source/Platform/chromium/public/WebIOSurfaceLayer.h b/Source/Platform/chromium/public/WebIOSurfaceLayer.h
index 37a4c6792..bcf14112a 100644
--- a/Source/Platform/chromium/public/WebIOSurfaceLayer.h
+++ b/Source/Platform/chromium/public/WebIOSurfaceLayer.h
@@ -30,27 +30,19 @@
#include "WebLayer.h"
#include "WebSize.h"
-namespace WebCore {
-class IOSurfaceLayerChromium;
-}
-
namespace WebKit {
// This class represents a layer that renders an externally managed IOSurface.
-class WebIOSurfaceLayer : public WebLayer {
+class WebIOSurfaceLayer {
public:
- WEBKIT_EXPORT static WebIOSurfaceLayer create();
+ WEBKIT_EXPORT static WebIOSurfaceLayer* create();
- WebIOSurfaceLayer() { }
virtual ~WebIOSurfaceLayer() { }
- // Sets the IO surface id that represents this layer's contents.
- WEBKIT_EXPORT void setIOSurfaceProperties(unsigned ioSurfaceId, WebSize);
+ virtual WebLayer* layer() = 0;
-private:
-#if WEBKIT_IMPLEMENTATION
- explicit WebIOSurfaceLayer(PassRefPtr<WebCore::IOSurfaceLayerChromium>);
-#endif
+ // Sets the IO surface id that represents this layer's contents.
+ virtual void setIOSurfaceProperties(unsigned ioSurfaceId, WebSize) = 0;
};
} // namespace WebKit
diff --git a/Source/Platform/chromium/public/WebImageLayer.h b/Source/Platform/chromium/public/WebImageLayer.h
index a916835f2..c7737f31a 100644
--- a/Source/Platform/chromium/public/WebImageLayer.h
+++ b/Source/Platform/chromium/public/WebImageLayer.h
@@ -30,24 +30,16 @@
#include "WebCommon.h"
#include "WebLayer.h"
-namespace WebCore {
-class ImageLayerChromium;
-}
-
namespace WebKit {
-class WebImageLayer : public WebLayer {
+class WebImageLayer {
public:
- WEBKIT_EXPORT static WebImageLayer create();
+ WEBKIT_EXPORT static WebImageLayer* create();
- WebImageLayer() { }
virtual ~WebImageLayer() { }
- WEBKIT_EXPORT void setBitmap(SkBitmap);
-
-#if WEBKIT_IMPLEMENTATION
- explicit WebImageLayer(PassRefPtr<WebCore::ImageLayerChromium>);
-#endif
+ virtual WebLayer* layer() = 0;
+ virtual void setBitmap(SkBitmap) = 0;
};
} // namespace WebKit
diff --git a/Source/Platform/chromium/public/WebLayer.h b/Source/Platform/chromium/public/WebLayer.h
index ec602411b..60ed69423 100644
--- a/Source/Platform/chromium/public/WebLayer.h
+++ b/Source/Platform/chromium/public/WebLayer.h
@@ -29,12 +29,13 @@
#include "WebAnimation.h"
#include "WebColor.h"
#include "WebCommon.h"
+#include "WebPoint.h"
#include "WebPrivatePtr.h"
+#include "WebRect.h"
#include "WebString.h"
#include "WebVector.h"
class SkMatrix44;
-namespace WebCore { class LayerChromium; }
namespace WebKit {
class WebAnimationDelegate;
@@ -44,80 +45,69 @@ struct WebFloatPoint;
struct WebFloatRect;
struct WebSize;
+class WebLayerImpl;
+
class WebLayer {
public:
- WEBKIT_EXPORT static WebLayer create();
-
- WebLayer() { }
- WebLayer(const WebLayer& layer) { assign(layer); }
- virtual ~WebLayer() { reset(); }
- WebLayer& operator=(const WebLayer& layer)
- {
- assign(layer);
- return *this;
- }
- bool isNull() const { return m_private.isNull(); }
- WEBKIT_EXPORT void reset();
- WEBKIT_EXPORT void assign(const WebLayer&);
- WEBKIT_EXPORT bool equals(const WebLayer&) const;
+#define WEBLAYER_IS_PURE_VIRTUAL
+ WEBKIT_EXPORT static WebLayer* create();
- // Sets a region of the layer as invalid, i.e. needs to update its content.
- WEBKIT_EXPORT void invalidateRect(const WebFloatRect&);
+ virtual ~WebLayer() { }
- // Sets the entire layer as invalid, i.e. needs to update its content.
- WEBKIT_EXPORT void invalidate();
+ // Returns a positive ID that will be unique across all WebLayers allocated in this process.
+ virtual int id() const = 0;
- WEBKIT_EXPORT WebLayer rootLayer() const;
- WEBKIT_EXPORT WebLayer parent() const;
- WEBKIT_EXPORT size_t numberOfChildren() const;
- WEBKIT_EXPORT WebLayer childAt(size_t) const;
+ // Sets a region of the layer as invalid, i.e. needs to update its content.
+ virtual void invalidateRect(const WebFloatRect&) = 0;
- WEBKIT_EXPORT void addChild(const WebLayer&);
- WEBKIT_EXPORT void insertChild(const WebLayer&, size_t index);
- WEBKIT_EXPORT void replaceChild(const WebLayer& reference, const WebLayer& newLayer);
- WEBKIT_EXPORT void setChildren(const WebVector<WebLayer>&);
- WEBKIT_EXPORT void removeFromParent();
- WEBKIT_EXPORT void removeAllChildren();
+ // Sets the entire layer as invalid, i.e. needs to update its content.
+ virtual void invalidate() = 0;
- WEBKIT_EXPORT void setAnchorPoint(const WebFloatPoint&);
- WEBKIT_EXPORT WebFloatPoint anchorPoint() const;
+ // These functions do not take ownership of the WebLayer* parameter.
+ virtual void addChild(WebLayer*) = 0;
+ virtual void insertChild(WebLayer*, size_t index) = 0;
+ virtual void replaceChild(WebLayer* reference, WebLayer* newLayer) = 0;
+ virtual void setChildren(const WebVector<WebLayer*>&) = 0;
+ virtual void removeFromParent() = 0;
+ virtual void removeAllChildren() = 0;
- WEBKIT_EXPORT void setAnchorPointZ(float);
- WEBKIT_EXPORT float anchorPointZ() const;
+ virtual void setAnchorPoint(const WebFloatPoint&) = 0;
+ virtual WebFloatPoint anchorPoint() const = 0;
- WEBKIT_EXPORT void setBounds(const WebSize&);
- WEBKIT_EXPORT WebSize bounds() const;
+ virtual void setAnchorPointZ(float) = 0;
+ virtual float anchorPointZ() const = 0;
- WEBKIT_EXPORT void setMasksToBounds(bool);
- WEBKIT_EXPORT bool masksToBounds() const;
+ virtual void setBounds(const WebSize&) = 0;
+ virtual WebSize bounds() const = 0;
- WEBKIT_EXPORT void setMaskLayer(const WebLayer&);
- WEBKIT_EXPORT WebLayer maskLayer() const;
+ virtual void setMasksToBounds(bool) = 0;
+ virtual bool masksToBounds() const = 0;
- WEBKIT_EXPORT void setReplicaLayer(const WebLayer&);
+ virtual void setMaskLayer(WebLayer*) = 0;
+ virtual void setReplicaLayer(WebLayer*) = 0;
- WEBKIT_EXPORT void setOpacity(float);
- WEBKIT_EXPORT float opacity() const;
+ virtual void setOpacity(float) = 0;
+ virtual float opacity() const = 0;
- WEBKIT_EXPORT void setOpaque(bool);
- WEBKIT_EXPORT bool opaque() const;
+ virtual void setOpaque(bool) = 0;
+ virtual bool opaque() const = 0;
- WEBKIT_EXPORT void setPosition(const WebFloatPoint&);
- WEBKIT_EXPORT WebFloatPoint position() const;
+ virtual void setPosition(const WebFloatPoint&) = 0;
+ virtual WebFloatPoint position() const = 0;
- WEBKIT_EXPORT void setSublayerTransform(const SkMatrix44&);
- WEBKIT_EXPORT void setSublayerTransform(const WebTransformationMatrix&);
- WEBKIT_EXPORT SkMatrix44 sublayerTransform() const;
+ virtual void setSublayerTransform(const SkMatrix44&) = 0;
+ virtual void setSublayerTransform(const WebTransformationMatrix&) = 0;
+ virtual SkMatrix44 sublayerTransform() const = 0;
- WEBKIT_EXPORT void setTransform(const SkMatrix44&);
- WEBKIT_EXPORT void setTransform(const WebTransformationMatrix&);
- WEBKIT_EXPORT SkMatrix44 transform() const;
+ virtual void setTransform(const SkMatrix44&) = 0;
+ virtual void setTransform(const WebTransformationMatrix&) = 0;
+ virtual SkMatrix44 transform() const = 0;
// Sets whether the layer draws its content when compositing.
- WEBKIT_EXPORT void setDrawsContent(bool);
- WEBKIT_EXPORT bool drawsContent() const;
+ virtual void setDrawsContent(bool) = 0;
+ virtual bool drawsContent() const = 0;
- WEBKIT_EXPORT void setPreserves3D(bool);
+ virtual void setPreserves3D(bool) = 0;
// Mark that this layer should use its parent's transform and double-sided
// properties in determining this layer's backface visibility instead of
@@ -126,107 +116,68 @@ public:
// Note: This API is to work around issues with visibility the handling of
// WebKit layers that have a contents layer (canvas, plugin, WebGL, video,
// etc).
- WEBKIT_EXPORT void setUseParentBackfaceVisibility(bool);
+ virtual void setUseParentBackfaceVisibility(bool) = 0;
- WEBKIT_EXPORT void setBackgroundColor(WebColor);
+ virtual void setBackgroundColor(WebColor) = 0;
// Clear the filters in use by passing in a newly instantiated
// WebFilterOperations object.
- WEBKIT_EXPORT void setFilters(const WebFilterOperations&);
+ virtual void setFilters(const WebFilterOperations&) = 0;
// Apply filters to pixels that show through the background of this layer.
// Note: These filters are only possible on layers that are drawn directly
// to a root render surface with an opaque background. This means if an
// ancestor of the background-filtered layer sets certain properties
// (opacity, transforms), it may conflict and hide the background filters.
- WEBKIT_EXPORT void setBackgroundFilters(const WebFilterOperations&);
+ virtual void setBackgroundFilters(const WebFilterOperations&) = 0;
- WEBKIT_EXPORT void setDebugBorderColor(const WebColor&);
- WEBKIT_EXPORT void setDebugBorderWidth(float);
- WEBKIT_EXPORT void setDebugName(WebString);
+ virtual void setDebugBorderColor(const WebColor&) = 0;
+ virtual void setDebugBorderWidth(float) = 0;
+ virtual void setDebugName(WebString) = 0;
// An animation delegate is notified when animations are started and
// stopped. The WebLayer does not take ownership of the delegate, and it is
// the responsibility of the client to reset the layer's delegate before
// deleting the delegate.
- WEBKIT_EXPORT void setAnimationDelegate(WebAnimationDelegate*);
+ virtual void setAnimationDelegate(WebAnimationDelegate*) = 0;
// Returns false if the animation cannot be added.
- WEBKIT_EXPORT bool addAnimation(const WebAnimation&);
+ virtual bool addAnimation(WebAnimation*) = 0;
// Removes all animations with the given id.
- WEBKIT_EXPORT void removeAnimation(int animationId);
+ virtual void removeAnimation(int animationId) = 0;
// Removes all animations with the given id targeting the given property.
- WEBKIT_EXPORT void removeAnimation(int animationId, WebAnimation::TargetProperty);
+ virtual void removeAnimation(int animationId, WebAnimation::TargetProperty) = 0;
// Pauses all animations with the given id.
- WEBKIT_EXPORT void pauseAnimation(int animationId, double timeOffset);
+ virtual void pauseAnimation(int animationId, double timeOffset) = 0;
// The following functions suspend and resume all animations. The given time
// is assumed to use the same time base as monotonicallyIncreasingTime().
- WEBKIT_EXPORT void suspendAnimations(double monotonicTime);
- WEBKIT_EXPORT void resumeAnimations(double monotonicTime);
+ virtual void suspendAnimations(double monotonicTime) = 0;
+ virtual void resumeAnimations(double monotonicTime) = 0;
+
+ // Returns true if this layer has any active animations - useful for tests.
+ virtual bool hasActiveAnimation() = 0;
// Transfers all animations running on the current layer.
- WEBKIT_EXPORT void transferAnimationsTo(WebLayer*);
+ virtual void transferAnimationsTo(WebLayer*) = 0;
- // DEPRECATED.
- // This requests that this layer's compositor-managed textures always be reserved
- // when determining texture limits.
- WEBKIT_EXPORT void setAlwaysReserveTextures(bool);
+ // Scrolling
+ virtual void setScrollPosition(WebPoint) = 0;
+ virtual void setScrollable(bool) = 0;
+ virtual void setHaveWheelEventHandlers(bool) = 0;
+ virtual void setShouldScrollOnMainThread(bool) = 0;
+ virtual void setNonFastScrollableRegion(const WebVector<WebRect>&) = 0;
+ virtual void setIsContainerForFixedPositionLayers(bool) = 0;
+ virtual void setFixedToContainerLayer(bool) = 0;
// Forces this layer to use a render surface. There is no benefit in doing
// so, but this is to facilitate benchmarks and tests.
- WEBKIT_EXPORT void setForceRenderSurface(bool);
-
- // Drops this layer's render surface, if it has one. Used to break cycles in some
- // cases - if you aren't sure, you don't need to call this.
- WEBKIT_EXPORT void clearRenderSurface();
-
- template<typename T> T to()
- {
- T res;
- res.WebLayer::assign(*this);
- return res;
- }
-
- template<typename T> const T toConst() const
- {
- T res;
- res.WebLayer::assign(*this);
- return res;
- }
-
-#if WEBKIT_IMPLEMENTATION
- WebLayer(const WTF::PassRefPtr<WebCore::LayerChromium>&);
- WebLayer& operator=(const WTF::PassRefPtr<WebCore::LayerChromium>&);
- operator WTF::PassRefPtr<WebCore::LayerChromium>() const;
- template<typename T> T* unwrap() const
- {
- return static_cast<T*>(m_private.get());
- }
-
- template<typename T> const T* constUnwrap() const
- {
- return static_cast<const T*>(m_private.get());
- }
-#endif
-
-protected:
- WebPrivatePtr<WebCore::LayerChromium> m_private;
+ virtual void setForceRenderSurface(bool) = 0;
};
-inline bool operator==(const WebLayer& a, const WebLayer& b)
-{
- return a.equals(b);
-}
-
-inline bool operator!=(const WebLayer& a, const WebLayer& b)
-{
- return !(a == b);
-}
-
} // namespace WebKit
#endif // WebLayer_h
diff --git a/Source/Platform/chromium/public/WebScrollableLayer.h b/Source/Platform/chromium/public/WebScrollableLayer.h
deleted file mode 100644
index ea02f8c73..000000000
--- a/Source/Platform/chromium/public/WebScrollableLayer.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebScrollableLayer_h
-#define WebScrollableLayer_h
-
-#include "WebCommon.h"
-#include "WebLayer.h"
-#include "WebPoint.h"
-#include "WebRect.h"
-#include "WebVector.h"
-
-namespace WebKit {
-
-class WebScrollableLayer : public WebLayer {
-public:
- WebScrollableLayer() { }
- WebScrollableLayer(const WebScrollableLayer& layer) : WebLayer(layer) { }
- virtual ~WebScrollableLayer() { }
- WebScrollableLayer& operator=(const WebScrollableLayer& layer)
- {
- WebLayer::assign(layer);
- return *this;
- }
-
- WEBKIT_EXPORT void setScrollPosition(WebPoint);
- WEBKIT_EXPORT void setScrollable(bool);
- WEBKIT_EXPORT void setHaveWheelEventHandlers(bool);
- WEBKIT_EXPORT void setShouldScrollOnMainThread(bool);
- WEBKIT_EXPORT void setNonFastScrollableRegion(const WebVector<WebRect>&);
- WEBKIT_EXPORT void setIsContainerForFixedPositionLayers(bool);
- WEBKIT_EXPORT void setFixedToContainerLayer(bool);
-
-
-#if WEBKIT_IMPLEMENTATION
- WebScrollableLayer(const WTF::PassRefPtr<WebCore::LayerChromium>& layer) : WebLayer(layer) { }
-#endif
-};
-
-} // namespace WebKit
-
-#endif // WebScrollableLayer_h
diff --git a/Source/Platform/chromium/public/WebScrollbarLayer.h b/Source/Platform/chromium/public/WebScrollbarLayer.h
index 1bfe7d6ab..451a0b9c1 100644
--- a/Source/Platform/chromium/public/WebScrollbarLayer.h
+++ b/Source/Platform/chromium/public/WebScrollbarLayer.h
@@ -32,29 +32,20 @@
namespace WebCore {
class Scrollbar;
-class ScrollbarLayerChromium;
}
namespace WebKit {
-class WebScrollbarLayer : public WebLayer {
+class WebScrollbarLayer {
public:
- WebScrollbarLayer() { }
- WebScrollbarLayer(const WebScrollbarLayer& layer) : WebLayer(layer) { }
virtual ~WebScrollbarLayer() { }
- WebScrollbarLayer& operator=(const WebScrollbarLayer& layer)
- {
- WebLayer::assign(layer);
- return *this;
- }
- WEBKIT_EXPORT void setScrollLayer(const WebLayer);
+ virtual WebLayer* layer() = 0;
+
+ virtual void setScrollLayer(WebLayer*) = 0;
#if WEBKIT_IMPLEMENTATION
- static WebScrollbarLayer create(WebCore::Scrollbar*, WebScrollbarThemePainter, PassOwnPtr<WebScrollbarThemeGeometry>);
- explicit WebScrollbarLayer(const WTF::PassRefPtr<WebCore::ScrollbarLayerChromium>&);
- WebScrollbarLayer& operator=(const WTF::PassRefPtr<WebCore::ScrollbarLayerChromium>&);
- operator WTF::PassRefPtr<WebCore::ScrollbarLayerChromium>() const;
+ WEBKIT_EXPORT static WebScrollbarLayer* create(WebCore::Scrollbar*, WebScrollbarThemePainter, PassOwnPtr<WebScrollbarThemeGeometry>);
#endif
};
diff --git a/Source/Platform/chromium/public/WebSolidColorLayer.h b/Source/Platform/chromium/public/WebSolidColorLayer.h
index ad9123d96..02e46f047 100644
--- a/Source/Platform/chromium/public/WebSolidColorLayer.h
+++ b/Source/Platform/chromium/public/WebSolidColorLayer.h
@@ -26,21 +26,20 @@
#ifndef WebSolidColorLayer_h
#define WebSolidColorLayer_h
+#include "WebColor.h"
#include "WebCommon.h"
-#include "WebFloatRect.h"
-#include "WebLayer.h"
namespace WebKit {
-class WebSolidColorLayerImpl;
+class WebLayer;
-class WebSolidColorLayer : public WebLayer {
+class WebSolidColorLayer {
public:
- WEBKIT_EXPORT static WebSolidColorLayer create();
- WEBKIT_EXPORT void setBackgroundColor(const WebColor&);
+ WEBKIT_EXPORT static WebSolidColorLayer* create();
-#if WEBKIT_IMPLEMENTATION
- WebSolidColorLayer(const WTF::PassRefPtr<WebSolidColorLayerImpl>&);
-#endif
+ virtual ~WebSolidColorLayer() { }
+
+ virtual WebLayer* layer() = 0;
+ virtual void setBackgroundColor(WebColor) = 0;
};
} // namespace WebKit
diff --git a/Source/Platform/chromium/public/WebVideoLayer.h b/Source/Platform/chromium/public/WebVideoLayer.h
index 54da3454b..1acfff54a 100644
--- a/Source/Platform/chromium/public/WebVideoLayer.h
+++ b/Source/Platform/chromium/public/WebVideoLayer.h
@@ -29,27 +29,20 @@
#include "WebCommon.h"
#include "WebLayer.h"
-namespace WebCore {
-class VideoLayerChromium;
-}
-
namespace WebKit {
class WebVideoFrameProvider;
-class WebVideoLayer : public WebLayer {
+class WebVideoLayer {
public:
- WEBKIT_EXPORT static WebVideoLayer create(WebVideoFrameProvider*);
+ WEBKIT_EXPORT static WebVideoLayer* create(WebVideoFrameProvider*);
- WebVideoLayer() { }
virtual ~WebVideoLayer() { }
- // Returns true if this layer is actively rendering (e.g. currently attached to a WebLayerTreeView).
- WEBKIT_EXPORT bool active() const;
+ virtual WebLayer* layer() = 0;
-#if WEBKIT_IMPLEMENTATION
- explicit WebVideoLayer(PassRefPtr<WebCore::VideoLayerChromium>);
-#endif
+ // Returns true if this layer is actively rendering (e.g. currently attached to a WebLayerTreeView).
+ virtual bool active() const = 0;
};
} // namespace WebKit