| Index: cc/layer.h
|
| diff --git a/cc/layer.h b/cc/layer.h
|
| index 0dd140f51f575a23cbf62abbd983202db295ab11..f3250d72bc19dd9248f715f99e612b9b711261d8 100644
|
| --- a/cc/layer.h
|
| +++ b/cc/layer.h
|
| @@ -24,26 +24,26 @@ class WebLayerScrollClient;
|
|
|
| namespace cc {
|
|
|
| -class CCActiveAnimation;
|
| -struct CCAnimationEvent;
|
| -class CCLayerAnimationDelegate;
|
| -class CCLayerImpl;
|
| -class CCLayerTreeHost;
|
| -class CCPriorityCalculator;
|
| -class CCTextureUpdateQueue;
|
| -class ScrollbarLayerChromium;
|
| -struct CCAnimationEvent;
|
| -struct CCRenderingStats;
|
| +class ActiveAnimation;
|
| +struct AnimationEvent;
|
| +class LayerAnimationDelegate;
|
| +class LayerImpl;
|
| +class LayerTreeHost;
|
| +class PriorityCalculator;
|
| +class TextureUpdateQueue;
|
| +class ScrollbarLayer;
|
| +struct AnimationEvent;
|
| +struct RenderingStats;
|
|
|
| // Base class for composited layers. Special layer types are derived from
|
| // this class.
|
| -class LayerChromium : public base::RefCounted<LayerChromium>, public CCLayerAnimationControllerClient {
|
| +class Layer : public base::RefCounted<Layer>, public LayerAnimationControllerClient {
|
| public:
|
| - typedef std::vector<scoped_refptr<LayerChromium> > LayerList;
|
| + typedef std::vector<scoped_refptr<Layer> > LayerList;
|
|
|
| - static scoped_refptr<LayerChromium> create();
|
| + static scoped_refptr<Layer> create();
|
|
|
| - // CCLayerAnimationControllerClient implementation
|
| + // LayerAnimationControllerClient implementation
|
| virtual int id() const OVERRIDE;
|
| virtual void setOpacityFromAnimation(float) OVERRIDE;
|
| virtual float opacity() const OVERRIDE;
|
| @@ -53,11 +53,11 @@ public:
|
| // The root layer is a special case -- it operates in physical pixels.
|
| virtual const WebKit::WebTransformationMatrix& transform() const OVERRIDE;
|
|
|
| - LayerChromium* rootLayer();
|
| - LayerChromium* parent() const;
|
| - void addChild(scoped_refptr<LayerChromium>);
|
| - void insertChild(scoped_refptr<LayerChromium>, size_t index);
|
| - void replaceChild(LayerChromium* reference, scoped_refptr<LayerChromium> newLayer);
|
| + Layer* rootLayer();
|
| + Layer* parent() const;
|
| + void addChild(scoped_refptr<Layer>);
|
| + void insertChild(scoped_refptr<Layer>, size_t index);
|
| + void replaceChild(Layer* reference, scoped_refptr<Layer> newLayer);
|
| void removeFromParent();
|
| void removeAllChildren();
|
| void setChildren(const LayerList&);
|
| @@ -82,8 +82,8 @@ public:
|
| void setMasksToBounds(bool);
|
| bool masksToBounds() const { return m_masksToBounds; }
|
|
|
| - void setMaskLayer(LayerChromium*);
|
| - LayerChromium* maskLayer() const { return m_maskLayer.get(); }
|
| + void setMaskLayer(Layer*);
|
| + Layer* maskLayer() const { return m_maskLayer.get(); }
|
|
|
| virtual void setNeedsDisplayRect(const FloatRect& dirtyRect);
|
| void setNeedsDisplay() { setNeedsDisplayRect(FloatRect(FloatPoint(), bounds())); }
|
| @@ -165,14 +165,14 @@ public:
|
| virtual void setUseLCDText(bool);
|
| bool useLCDText() const { return m_useLCDText; }
|
|
|
| - virtual void setLayerTreeHost(CCLayerTreeHost*);
|
| + virtual void setLayerTreeHost(LayerTreeHost*);
|
|
|
| bool hasContributingDelegatedRenderPasses() const { return false; }
|
|
|
| void setIsDrawable(bool);
|
|
|
| - void setReplicaLayer(LayerChromium*);
|
| - LayerChromium* replicaLayer() const { return m_replicaLayer.get(); }
|
| + void setReplicaLayer(Layer*);
|
| + Layer* replicaLayer() const { return m_replicaLayer.get(); }
|
|
|
| bool hasMask() const { return m_maskLayer; }
|
| bool hasReplica() const { return m_replicaLayer; }
|
| @@ -180,7 +180,7 @@ public:
|
|
|
| // These methods typically need to be overwritten by derived classes.
|
| virtual bool drawsContent() const;
|
| - virtual void update(CCTextureUpdateQueue&, const CCOcclusionTracker*, CCRenderingStats&) { }
|
| + virtual void update(TextureUpdateQueue&, const OcclusionTracker*, RenderingStats&) { }
|
| virtual bool needMoreUpdates();
|
| virtual void setIsMask(bool) { }
|
| virtual void bindContentsTexture() { }
|
| @@ -190,10 +190,10 @@ public:
|
| void setDebugBorderWidth(float);
|
| void setDebugName(const std::string&);
|
|
|
| - virtual void pushPropertiesTo(CCLayerImpl*);
|
| + virtual void pushPropertiesTo(LayerImpl*);
|
|
|
| void clearRenderSurface() { m_renderSurface.reset(); }
|
| - RenderSurfaceChromium* renderSurface() const { return m_renderSurface.get(); }
|
| + RenderSurface* renderSurface() const { return m_renderSurface.get(); }
|
| void createRenderSurface();
|
|
|
| float drawOpacity() const { return m_drawOpacity; }
|
| @@ -202,8 +202,8 @@ public:
|
| bool drawOpacityIsAnimating() const { return m_drawOpacityIsAnimating; }
|
| void setDrawOpacityIsAnimating(bool drawOpacityIsAnimating) { m_drawOpacityIsAnimating = drawOpacityIsAnimating; }
|
|
|
| - LayerChromium* renderTarget() const { ASSERT(!m_renderTarget || m_renderTarget->renderSurface()); return m_renderTarget; }
|
| - void setRenderTarget(LayerChromium* target) { m_renderTarget = target; }
|
| + Layer* renderTarget() const { ASSERT(!m_renderTarget || m_renderTarget->renderSurface()); return m_renderTarget; }
|
| + void setRenderTarget(Layer* target) { m_renderTarget = target; }
|
|
|
| bool drawTransformIsAnimating() const { return m_drawTransformIsAnimating; }
|
| void setDrawTransformIsAnimating(bool animating) { m_drawTransformIsAnimating = animating; }
|
| @@ -234,39 +234,39 @@ public:
|
| // Returns true if any of the layer's descendants has content to draw.
|
| bool descendantDrawsContent();
|
|
|
| - CCLayerTreeHost* layerTreeHost() const { return m_layerTreeHost; }
|
| + LayerTreeHost* layerTreeHost() const { return m_layerTreeHost; }
|
|
|
| // Set the priority of all desired textures in this layer.
|
| - virtual void setTexturePriorities(const CCPriorityCalculator&) { }
|
| + virtual void setTexturePriorities(const PriorityCalculator&) { }
|
|
|
| - bool addAnimation(scoped_ptr<CCActiveAnimation>);
|
| + bool addAnimation(scoped_ptr<ActiveAnimation>);
|
| void pauseAnimation(int animationId, double timeOffset);
|
| void removeAnimation(int animationId);
|
|
|
| void suspendAnimations(double monotonicTime);
|
| void resumeAnimations(double monotonicTime);
|
|
|
| - CCLayerAnimationController* layerAnimationController() { return m_layerAnimationController.get(); }
|
| - void setLayerAnimationController(scoped_ptr<CCLayerAnimationController>);
|
| - scoped_ptr<CCLayerAnimationController> releaseLayerAnimationController();
|
| + LayerAnimationController* layerAnimationController() { return m_layerAnimationController.get(); }
|
| + void setLayerAnimationController(scoped_ptr<LayerAnimationController>);
|
| + scoped_ptr<LayerAnimationController> releaseLayerAnimationController();
|
|
|
| void setLayerAnimationDelegate(WebKit::WebAnimationDelegate* layerAnimationDelegate) { m_layerAnimationDelegate = layerAnimationDelegate; }
|
|
|
| bool hasActiveAnimation() const;
|
|
|
| - virtual void notifyAnimationStarted(const CCAnimationEvent&, double wallClockTime);
|
| + virtual void notifyAnimationStarted(const AnimationEvent&, double wallClockTime);
|
| virtual void notifyAnimationFinished(double wallClockTime);
|
|
|
| virtual Region visibleContentOpaqueRegion() const;
|
|
|
| - virtual ScrollbarLayerChromium* toScrollbarLayerChromium();
|
| + virtual ScrollbarLayer* toScrollbarLayer();
|
|
|
| protected:
|
| - friend class CCLayerImpl;
|
| + friend class LayerImpl;
|
| friend class TreeSynchronizer;
|
| - virtual ~LayerChromium();
|
| + virtual ~Layer();
|
|
|
| - LayerChromium();
|
| + Layer();
|
|
|
| void setNeedsCommit();
|
|
|
| @@ -284,36 +284,36 @@ protected:
|
| // Note this rect is in layer space (not content space).
|
| FloatRect m_updateRect;
|
|
|
| - scoped_refptr<LayerChromium> m_maskLayer;
|
| + scoped_refptr<Layer> m_maskLayer;
|
|
|
| - // Constructs a CCLayerImpl of the correct runtime type for this LayerChromium type.
|
| - virtual scoped_ptr<CCLayerImpl> createCCLayerImpl();
|
| + // Constructs a LayerImpl of the correct runtime type for this Layer type.
|
| + virtual scoped_ptr<LayerImpl> createLayerImpl();
|
| int m_layerId;
|
|
|
| private:
|
| - friend class base::RefCounted<LayerChromium>;
|
| + friend class base::RefCounted<Layer>;
|
|
|
| - void setParent(LayerChromium*);
|
| - bool hasAncestor(LayerChromium*) const;
|
| + void setParent(Layer*);
|
| + bool hasAncestor(Layer*) const;
|
| bool descendantIsFixedToContainerLayer() const;
|
|
|
| size_t numChildren() const { return m_children.size(); }
|
|
|
| // Returns the index of the child or -1 if not found.
|
| - int indexOfChild(const LayerChromium*);
|
| + int indexOfChild(const Layer*);
|
|
|
| // This should only be called from removeFromParent.
|
| - void removeChild(LayerChromium*);
|
| + void removeChild(Layer*);
|
|
|
| LayerList m_children;
|
| - LayerChromium* m_parent;
|
| + Layer* m_parent;
|
|
|
| - // LayerChromium instances have a weak pointer to their CCLayerTreeHost.
|
| - // This pointer value is nil when a LayerChromium is not in a tree and is
|
| + // Layer instances have a weak pointer to their LayerTreeHost.
|
| + // This pointer value is nil when a Layer is not in a tree and is
|
| // updated via setLayerTreeHost() if a layer moves between trees.
|
| - CCLayerTreeHost* m_layerTreeHost;
|
| + LayerTreeHost* m_layerTreeHost;
|
|
|
| - scoped_ptr<CCLayerAnimationController> m_layerAnimationController;
|
| + scoped_ptr<LayerAnimationController> m_layerAnimationController;
|
|
|
| // Layer properties.
|
| IntSize m_bounds;
|
| @@ -354,14 +354,14 @@ private:
|
| WebKit::WebTransformationMatrix m_sublayerTransform;
|
|
|
| // Replica layer used for reflections.
|
| - scoped_refptr<LayerChromium> m_replicaLayer;
|
| + scoped_refptr<Layer> m_replicaLayer;
|
|
|
| // Transient properties.
|
| - scoped_ptr<RenderSurfaceChromium> m_renderSurface;
|
| + scoped_ptr<RenderSurface> m_renderSurface;
|
| float m_drawOpacity;
|
| bool m_drawOpacityIsAnimating;
|
|
|
| - LayerChromium* m_renderTarget;
|
| + Layer* m_renderTarget;
|
|
|
| WebKit::WebTransformationMatrix m_drawTransform;
|
| WebKit::WebTransformationMatrix m_screenSpaceTransform;
|
| @@ -379,7 +379,7 @@ private:
|
| WebKit::WebLayerScrollClient* m_layerScrollClient;
|
| };
|
|
|
| -void sortLayers(std::vector<scoped_refptr<LayerChromium> >::iterator, std::vector<scoped_refptr<LayerChromium> >::iterator, void*);
|
| +void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped_refptr<Layer> >::iterator, void*);
|
|
|
| } // namespace cc
|
|
|
|
|