diff options
Diffstat (limited to 'Source/Platform/chromium/public')
-rw-r--r-- | Source/Platform/chromium/public/WebContentLayer.h | 36 | ||||
-rw-r--r-- | Source/Platform/chromium/public/WebExternalTextureLayer.h | 34 | ||||
-rw-r--r-- | Source/Platform/chromium/public/WebIOSurfaceLayer.h | 18 | ||||
-rw-r--r-- | Source/Platform/chromium/public/WebImageLayer.h | 16 | ||||
-rw-r--r-- | Source/Platform/chromium/public/WebLayer.h | 182 | ||||
-rw-r--r-- | Source/Platform/chromium/public/WebScrollableLayer.h | 64 | ||||
-rw-r--r-- | Source/Platform/chromium/public/WebScrollbarLayer.h | 19 | ||||
-rw-r--r-- | Source/Platform/chromium/public/WebSolidColorLayer.h | 17 | ||||
-rw-r--r-- | Source/Platform/chromium/public/WebVideoLayer.h | 17 |
9 files changed, 284 insertions, 119 deletions
diff --git a/Source/Platform/chromium/public/WebContentLayer.h b/Source/Platform/chromium/public/WebContentLayer.h index 312107f9c..7336bfabc 100644 --- a/Source/Platform/chromium/public/WebContentLayer.h +++ b/Source/Platform/chromium/public/WebContentLayer.h @@ -27,37 +27,55 @@ #define WebContentLayer_h #include "WebCommon.h" +#include "WebScrollableLayer.h" + +namespace WebCore { +class ContentLayerChromium; +} namespace WebKit { class WebContentLayerClient; +class WebContentLayerImpl; -class WebContentLayer { +class WebContentLayer : public WebScrollableLayer { public: - // The client must outlive the WebContentLayer. - WEBKIT_EXPORT static WebContentLayer* create(WebContentLayerClient*); + 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; + } - // The WebContentLayer has ownership of this wrapper. - virtual WebLayer* layer() = 0; + // Called when the WebContentLayerClient is going away and should not be used. + WEBKIT_EXPORT void clearClient(); // Set to true if the backside of this layer's contents should be visible when composited. // Defaults to false. - virtual void setDoubleSided(bool) = 0; + WEBKIT_EXPORT void setDoubleSided(bool); // Set to apply a scale factor used when painting and drawing this layer's content. Defaults to 1.0. - virtual void setContentsScale(float) = 0; + WEBKIT_EXPORT void setContentsScale(float); // 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; - virtual void setUseLCDText(bool) = 0; + WEBKIT_EXPORT void setUseLCDText(bool); // 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. - virtual void setDrawCheckerboardForMissingTiles(bool) = 0; + 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 }; } // namespace WebKit diff --git a/Source/Platform/chromium/public/WebExternalTextureLayer.h b/Source/Platform/chromium/public/WebExternalTextureLayer.h index 92d2c4fee..b19c05f3e 100644 --- a/Source/Platform/chromium/public/WebExternalTextureLayer.h +++ b/Source/Platform/chromium/public/WebExternalTextureLayer.h @@ -30,6 +30,10 @@ #include "WebFloatRect.h" #include "WebLayer.h" +namespace WebCore { +class TextureLayerChromium; +} + namespace WebKit { class WebExternalTextureLayerClient; @@ -40,43 +44,49 @@ 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 { +class WebExternalTextureLayer : public WebLayer { 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. - // The client must outlive the WebExternalTextureLayer. - WEBKIT_EXPORT static WebExternalTextureLayer* create(WebExternalTextureLayerClient* = 0); + WEBKIT_EXPORT static WebExternalTextureLayer create(WebExternalTextureLayerClient* = 0); - virtual ~WebExternalTextureLayer() { } + // Indicates that the client for this layer is going away and shouldn't be used. + WEBKIT_EXPORT void clearClient(); - virtual WebLayer* layer() = 0; + WebExternalTextureLayer() { } + virtual ~WebExternalTextureLayer() { } // Sets the texture id that represents the layer, in the namespace of the // compositor context. - virtual void setTextureId(unsigned) = 0; + WEBKIT_EXPORT void setTextureId(unsigned); // Sets whether or not the texture should be flipped in the Y direction when // rendered. - virtual void setFlipped(bool) = 0; + WEBKIT_EXPORT void setFlipped(bool); // Sets the rect in UV space of the texture that is mapped to the layer // bounds. - virtual void setUVRect(const WebFloatRect&) = 0; + WEBKIT_EXPORT void setUVRect(const WebFloatRect&); // Sets whether every pixel in this layer is opaque. Defaults to false. - virtual void setOpaque(bool) = 0; + WEBKIT_EXPORT void setOpaque(bool); // Sets whether this layer's texture has premultiplied alpha or not. Defaults to true. - virtual void setPremultipliedAlpha(bool) = 0; + WEBKIT_EXPORT void setPremultipliedAlpha(bool); // Indicates that the most recently provided texture ID is about to be modified externally. - virtual void willModifyTexture() = 0; + WEBKIT_EXPORT void willModifyTexture(); // 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. - virtual void setRateLimitContext(bool) = 0; + WEBKIT_EXPORT void setRateLimitContext(bool); + +private: +#if WEBKIT_IMPLEMENTATION + explicit WebExternalTextureLayer(PassRefPtr<WebCore::TextureLayerChromium>); +#endif }; } // namespace WebKit diff --git a/Source/Platform/chromium/public/WebIOSurfaceLayer.h b/Source/Platform/chromium/public/WebIOSurfaceLayer.h index bcf14112a..37a4c6792 100644 --- a/Source/Platform/chromium/public/WebIOSurfaceLayer.h +++ b/Source/Platform/chromium/public/WebIOSurfaceLayer.h @@ -30,19 +30,27 @@ #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 { +class WebIOSurfaceLayer : public WebLayer { public: - WEBKIT_EXPORT static WebIOSurfaceLayer* create(); + WEBKIT_EXPORT static WebIOSurfaceLayer create(); + WebIOSurfaceLayer() { } virtual ~WebIOSurfaceLayer() { } - virtual WebLayer* layer() = 0; - // Sets the IO surface id that represents this layer's contents. - virtual void setIOSurfaceProperties(unsigned ioSurfaceId, WebSize) = 0; + WEBKIT_EXPORT void setIOSurfaceProperties(unsigned ioSurfaceId, WebSize); + +private: +#if WEBKIT_IMPLEMENTATION + explicit WebIOSurfaceLayer(PassRefPtr<WebCore::IOSurfaceLayerChromium>); +#endif }; } // namespace WebKit diff --git a/Source/Platform/chromium/public/WebImageLayer.h b/Source/Platform/chromium/public/WebImageLayer.h index c7737f31a..a916835f2 100644 --- a/Source/Platform/chromium/public/WebImageLayer.h +++ b/Source/Platform/chromium/public/WebImageLayer.h @@ -30,16 +30,24 @@ #include "WebCommon.h" #include "WebLayer.h" +namespace WebCore { +class ImageLayerChromium; +} + namespace WebKit { -class WebImageLayer { +class WebImageLayer : public WebLayer { public: - WEBKIT_EXPORT static WebImageLayer* create(); + WEBKIT_EXPORT static WebImageLayer create(); + WebImageLayer() { } virtual ~WebImageLayer() { } - virtual WebLayer* layer() = 0; - virtual void setBitmap(SkBitmap) = 0; + WEBKIT_EXPORT void setBitmap(SkBitmap); + +#if WEBKIT_IMPLEMENTATION + explicit WebImageLayer(PassRefPtr<WebCore::ImageLayerChromium>); +#endif }; } // namespace WebKit diff --git a/Source/Platform/chromium/public/WebLayer.h b/Source/Platform/chromium/public/WebLayer.h index 60ed69423..6431f848c 100644 --- a/Source/Platform/chromium/public/WebLayer.h +++ b/Source/Platform/chromium/public/WebLayer.h @@ -29,13 +29,12 @@ #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; @@ -45,69 +44,73 @@ struct WebFloatPoint; struct WebFloatRect; struct WebSize; -class WebLayerImpl; - class WebLayer { public: -#define WEBLAYER_IS_PURE_VIRTUAL - WEBKIT_EXPORT static WebLayer* create(); - - virtual ~WebLayer() { } - - // Returns a positive ID that will be unique across all WebLayers allocated in this process. - virtual int id() const = 0; + 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; // Sets a region of the layer as invalid, i.e. needs to update its content. - virtual void invalidateRect(const WebFloatRect&) = 0; + WEBKIT_EXPORT void invalidateRect(const WebFloatRect&); // Sets the entire layer as invalid, i.e. needs to update its content. - virtual void invalidate() = 0; + WEBKIT_EXPORT void invalidate(); - // 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 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(); - virtual void setAnchorPoint(const WebFloatPoint&) = 0; - virtual WebFloatPoint anchorPoint() const = 0; + WEBKIT_EXPORT void setAnchorPoint(const WebFloatPoint&); + WEBKIT_EXPORT WebFloatPoint anchorPoint() const; - virtual void setAnchorPointZ(float) = 0; - virtual float anchorPointZ() const = 0; + WEBKIT_EXPORT void setAnchorPointZ(float); + WEBKIT_EXPORT float anchorPointZ() const; - virtual void setBounds(const WebSize&) = 0; - virtual WebSize bounds() const = 0; + WEBKIT_EXPORT void setBounds(const WebSize&); + WEBKIT_EXPORT WebSize bounds() const; - virtual void setMasksToBounds(bool) = 0; - virtual bool masksToBounds() const = 0; + WEBKIT_EXPORT void setMasksToBounds(bool); + WEBKIT_EXPORT bool masksToBounds() const; - virtual void setMaskLayer(WebLayer*) = 0; - virtual void setReplicaLayer(WebLayer*) = 0; + WEBKIT_EXPORT void setMaskLayer(const WebLayer&); + WEBKIT_EXPORT void setReplicaLayer(const WebLayer&); - virtual void setOpacity(float) = 0; - virtual float opacity() const = 0; + WEBKIT_EXPORT void setOpacity(float); + WEBKIT_EXPORT float opacity() const; - virtual void setOpaque(bool) = 0; - virtual bool opaque() const = 0; + WEBKIT_EXPORT void setOpaque(bool); + WEBKIT_EXPORT bool opaque() const; - virtual void setPosition(const WebFloatPoint&) = 0; - virtual WebFloatPoint position() const = 0; + WEBKIT_EXPORT void setPosition(const WebFloatPoint&); + WEBKIT_EXPORT WebFloatPoint position() const; - virtual void setSublayerTransform(const SkMatrix44&) = 0; - virtual void setSublayerTransform(const WebTransformationMatrix&) = 0; - virtual SkMatrix44 sublayerTransform() const = 0; + WEBKIT_EXPORT void setSublayerTransform(const SkMatrix44&); + WEBKIT_EXPORT void setSublayerTransform(const WebTransformationMatrix&); + WEBKIT_EXPORT SkMatrix44 sublayerTransform() const; - virtual void setTransform(const SkMatrix44&) = 0; - virtual void setTransform(const WebTransformationMatrix&) = 0; - virtual SkMatrix44 transform() const = 0; + WEBKIT_EXPORT void setTransform(const SkMatrix44&); + WEBKIT_EXPORT void setTransform(const WebTransformationMatrix&); + WEBKIT_EXPORT SkMatrix44 transform() const; // Sets whether the layer draws its content when compositing. - virtual void setDrawsContent(bool) = 0; - virtual bool drawsContent() const = 0; + WEBKIT_EXPORT void setDrawsContent(bool); + WEBKIT_EXPORT bool drawsContent() const; - virtual void setPreserves3D(bool) = 0; + WEBKIT_EXPORT void setPreserves3D(bool); // Mark that this layer should use its parent's transform and double-sided // properties in determining this layer's backface visibility instead of @@ -116,68 +119,105 @@ 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). - virtual void setUseParentBackfaceVisibility(bool) = 0; + WEBKIT_EXPORT void setUseParentBackfaceVisibility(bool); - virtual void setBackgroundColor(WebColor) = 0; + WEBKIT_EXPORT void setBackgroundColor(WebColor); // Clear the filters in use by passing in a newly instantiated // WebFilterOperations object. - virtual void setFilters(const WebFilterOperations&) = 0; + WEBKIT_EXPORT void setFilters(const WebFilterOperations&); // 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. - virtual void setBackgroundFilters(const WebFilterOperations&) = 0; + WEBKIT_EXPORT void setBackgroundFilters(const WebFilterOperations&); - virtual void setDebugBorderColor(const WebColor&) = 0; - virtual void setDebugBorderWidth(float) = 0; - virtual void setDebugName(WebString) = 0; + WEBKIT_EXPORT void setDebugBorderColor(const WebColor&); + WEBKIT_EXPORT void setDebugBorderWidth(float); + WEBKIT_EXPORT void setDebugName(WebString); // 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. - virtual void setAnimationDelegate(WebAnimationDelegate*) = 0; + WEBKIT_EXPORT void setAnimationDelegate(WebAnimationDelegate*); // Returns false if the animation cannot be added. - virtual bool addAnimation(WebAnimation*) = 0; + WEBKIT_EXPORT bool addAnimation(WebAnimation*); // Removes all animations with the given id. - virtual void removeAnimation(int animationId) = 0; + WEBKIT_EXPORT void removeAnimation(int animationId); // Removes all animations with the given id targeting the given property. - virtual void removeAnimation(int animationId, WebAnimation::TargetProperty) = 0; + WEBKIT_EXPORT void removeAnimation(int animationId, WebAnimation::TargetProperty); // Pauses all animations with the given id. - virtual void pauseAnimation(int animationId, double timeOffset) = 0; + WEBKIT_EXPORT void pauseAnimation(int animationId, double timeOffset); // The following functions suspend and resume all animations. The given time // is assumed to use the same time base as monotonicallyIncreasingTime(). - virtual void suspendAnimations(double monotonicTime) = 0; - virtual void resumeAnimations(double monotonicTime) = 0; + WEBKIT_EXPORT void suspendAnimations(double monotonicTime); + WEBKIT_EXPORT void resumeAnimations(double monotonicTime); // Returns true if this layer has any active animations - useful for tests. - virtual bool hasActiveAnimation() = 0; + WEBKIT_EXPORT bool hasActiveAnimation(); // Transfers all animations running on the current layer. - virtual void transferAnimationsTo(WebLayer*) = 0; - - // 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; + WEBKIT_EXPORT void transferAnimationsTo(WebLayer*); // Forces this layer to use a render surface. There is no benefit in doing // so, but this is to facilitate benchmarks and tests. - virtual void setForceRenderSurface(bool) = 0; + 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; }; +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 new file mode 100644 index 000000000..ea02f8c73 --- /dev/null +++ b/Source/Platform/chromium/public/WebScrollableLayer.h @@ -0,0 +1,64 @@ +/* + * 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 451a0b9c1..1bfe7d6ab 100644 --- a/Source/Platform/chromium/public/WebScrollbarLayer.h +++ b/Source/Platform/chromium/public/WebScrollbarLayer.h @@ -32,20 +32,29 @@ namespace WebCore { class Scrollbar; +class ScrollbarLayerChromium; } namespace WebKit { -class WebScrollbarLayer { +class WebScrollbarLayer : public WebLayer { public: + WebScrollbarLayer() { } + WebScrollbarLayer(const WebScrollbarLayer& layer) : WebLayer(layer) { } virtual ~WebScrollbarLayer() { } + WebScrollbarLayer& operator=(const WebScrollbarLayer& layer) + { + WebLayer::assign(layer); + return *this; + } - virtual WebLayer* layer() = 0; - - virtual void setScrollLayer(WebLayer*) = 0; + WEBKIT_EXPORT void setScrollLayer(const WebLayer); #if WEBKIT_IMPLEMENTATION - WEBKIT_EXPORT static WebScrollbarLayer* create(WebCore::Scrollbar*, WebScrollbarThemePainter, PassOwnPtr<WebScrollbarThemeGeometry>); + 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; #endif }; diff --git a/Source/Platform/chromium/public/WebSolidColorLayer.h b/Source/Platform/chromium/public/WebSolidColorLayer.h index 02e46f047..ad9123d96 100644 --- a/Source/Platform/chromium/public/WebSolidColorLayer.h +++ b/Source/Platform/chromium/public/WebSolidColorLayer.h @@ -26,20 +26,21 @@ #ifndef WebSolidColorLayer_h #define WebSolidColorLayer_h -#include "WebColor.h" #include "WebCommon.h" +#include "WebFloatRect.h" +#include "WebLayer.h" namespace WebKit { -class WebLayer; +class WebSolidColorLayerImpl; -class WebSolidColorLayer { +class WebSolidColorLayer : public WebLayer { public: - WEBKIT_EXPORT static WebSolidColorLayer* create(); + WEBKIT_EXPORT static WebSolidColorLayer create(); + WEBKIT_EXPORT void setBackgroundColor(const WebColor&); - virtual ~WebSolidColorLayer() { } - - virtual WebLayer* layer() = 0; - virtual void setBackgroundColor(WebColor) = 0; +#if WEBKIT_IMPLEMENTATION + WebSolidColorLayer(const WTF::PassRefPtr<WebSolidColorLayerImpl>&); +#endif }; } // namespace WebKit diff --git a/Source/Platform/chromium/public/WebVideoLayer.h b/Source/Platform/chromium/public/WebVideoLayer.h index 1acfff54a..54da3454b 100644 --- a/Source/Platform/chromium/public/WebVideoLayer.h +++ b/Source/Platform/chromium/public/WebVideoLayer.h @@ -29,20 +29,27 @@ #include "WebCommon.h" #include "WebLayer.h" +namespace WebCore { +class VideoLayerChromium; +} + namespace WebKit { class WebVideoFrameProvider; -class WebVideoLayer { +class WebVideoLayer : public WebLayer { public: - WEBKIT_EXPORT static WebVideoLayer* create(WebVideoFrameProvider*); + WEBKIT_EXPORT static WebVideoLayer create(WebVideoFrameProvider*); + WebVideoLayer() { } virtual ~WebVideoLayer() { } - virtual WebLayer* layer() = 0; - // Returns true if this layer is actively rendering (e.g. currently attached to a WebLayerTreeView). - virtual bool active() const = 0; + WEBKIT_EXPORT bool active() const; + +#if WEBKIT_IMPLEMENTATION + explicit WebVideoLayer(PassRefPtr<WebCore::VideoLayerChromium>); +#endif }; } // namespace WebKit |