class KeyframeList;
class RenderLayerCompositor;
-class WebAnimationProvider;
enum CompositingLayerType {
NormalCompositingLayer, // non-tiled layer with backing store
GraphicsLayerPaintingPhase paintingPhase;
bool isBackgroundLayer;
+
+ bool isEquivalentForSquashing(const GraphicsLayerPaintInfo& other)
+ {
+ // FIXME: offsetFromRenderer and compositedBounds should not be checked here, because
+ // they are not yet fixed at the time this function is used.
+ return renderLayer == other.renderLayer
+ && offsetFromSquashingCLM == other.offsetFromSquashingCLM
+ && paintingPhase == other.paintingPhase
+ && isBackgroundLayer == other.isBackgroundLayer;
+ }
};
// CompositedLayerMapping keeps track of how RenderLayers of the render tree correspond to
GraphicsLayer* scrollingContentsLayer() const { return m_scrollingContentsLayer.get(); }
bool hasMaskLayer() const { return m_maskLayer; }
+ GraphicsLayer* maskLayer() const { return m_maskLayer.get(); }
+
bool hasChildClippingMaskLayer() const { return m_childClippingMaskLayer; }
+ GraphicsLayer* childClippingMaskLayer() const { return m_childClippingMaskLayer.get(); }
GraphicsLayer* parentForSublayers() const;
GraphicsLayer* childForSuperlayers() const;
// localRootForOwningLayer does not include the m_squashingContainmentLayer, which is technically not associated with this CLM's owning layer.
GraphicsLayer* localRootForOwningLayer() const;
+
+ GraphicsLayer* childTransformLayer() const { return m_childTransformLayer.get(); }
+
+ GraphicsLayer* squashingContainmentLayer() const { return m_squashingContainmentLayer.get(); }
GraphicsLayer* squashingLayer() const { return m_squashingLayer.get(); }
+ // Contains the bottommost layer in the hierarchy that can contain the children transform.
+ GraphicsLayer* layerForChildrenTransform() const;
// Returns true for a composited layer that has no backing store of its own, so
// paints into some ancestor layer.
// Notification from the renderer that its content changed.
void contentChanged(ContentChangeType);
- // Interface to start, finish, suspend and resume animations and transitions
- bool startTransition(double, CSSPropertyID, const RenderStyle* fromStyle, const RenderStyle* toStyle);
- void transitionPaused(double timeOffset, CSSPropertyID);
- void transitionFinished(CSSPropertyID);
-
- bool startAnimation(double timeOffset, const CSSAnimationData*, const KeyframeList& keyframes);
- void animationPaused(double timeOffset, const String& name);
- void animationFinished(const String& name);
-
LayoutRect compositedBounds() const;
void setCompositedBounds(const LayoutRect&);
void updateCompositedBounds();
void positionOverflowControlsLayers(const IntSize& offsetFromRoot);
bool hasUnpositionedOverflowControlsLayers() const;
- void addRenderLayerToSquashingGraphicsLayer(RenderLayer*, IntSize offsetFromSquashingCLM, size_t nextSquashedLayerIndex);
+ // Returns true if the assignment actually changed the assigned squashing layer.
+ bool updateSquashingLayerAssignment(RenderLayer*, IntSize offsetFromSquashingCLM, size_t nextSquashedLayerIndex);
+ void removeRenderLayerFromSquashingGraphicsLayer(const RenderLayer*);
+
void finishAccumulatingSquashingLayers(size_t nextSquashedLayerIndex);
+ void updateRenderingContext();
+ void updateShouldFlattenTransform();
// GraphicsLayerClient interface
virtual void notifyAnimationStarted(const GraphicsLayer*, double wallClockTime, double monotonicTime) OVERRIDE;
void updateFilters(const RenderStyle*);
bool canCompositeFilters() const { return m_canCompositeFilters; }
- // Return an estimate of the backing store area (in pixels) allocated by this object's GraphicsLayers.
- double backingStoreMemoryEstimate() const;
-
void setBlendMode(blink::WebBlendMode);
virtual String debugName(const GraphicsLayer*) OVERRIDE;
void destroyGraphicsLayers();
PassOwnPtr<GraphicsLayer> createGraphicsLayer(CompositingReasons);
+ bool toggleScrollbarLayerIfNeeded(OwnPtr<GraphicsLayer>&, bool needsLayer);
RenderLayerModelObject* renderer() const { return m_owningLayer->renderer(); }
RenderLayerCompositor* compositor() const { return m_owningLayer->compositor(); }
void updateInternalHierarchy();
bool updateClippingLayers(bool needsAncestorClip, bool needsDescendantClip);
+ bool updateChildTransformLayer(bool needsChildTransformLayer);
bool updateOverflowControlsLayers(bool needsHorizontalScrollbarLayer, bool needsVerticalScrollbarLayer, bool needsScrollCornerLayer);
bool updateForegroundLayer(bool needsForegroundLayer);
bool updateBackgroundLayer(bool needsBackgroundLayer);
void updateClipParent(RenderLayer*);
bool updateSquashingLayers(bool needsSquashingLayers);
void updateDrawsContent(bool isSimpleContainer);
+ void updateChildrenTransform();
void registerScrollingLayers();
void adjustBoundsForSubPixelAccumulation(const RenderLayer* compositedAncestor, IntRect& localCompositingBounds, IntRect& relativeCompositingBounds, IntPoint& delta);
// Result is perspective origin in pixels.
FloatPoint computePerspectiveOrigin(const IntRect& borderBox) const;
+ void updateSquashingLayerGeometry(const IntPoint& delta);
+
void updateOpacity(const RenderStyle*);
void updateTransform(const RenderStyle*);
void updateLayerBlendMode(const RenderStyle*);
//
// + m_ancestorClippingLayer [OPTIONAL]
// + m_graphicsLayer
- // + m_childContainmentLayer [OPTIONAL] <-OR-> m_scrollingLayer [OPTIONAL]
+ // + m_childContainmentLayer [OPTIONAL] <-OR-> m_scrollingLayer [OPTIONAL] <-OR-> m_childTransformLayer
// + m_scrollingContentsLayer [OPTIONAL]
//
// We need an ancestor clipping layer if our clipping ancestor is not our ancestor in the
OwnPtr<GraphicsLayer> m_ancestorClippingLayer; // Only used if we are clipped by an ancestor which is not a stacking context.
OwnPtr<GraphicsLayer> m_graphicsLayer;
OwnPtr<GraphicsLayer> m_childContainmentLayer; // Only used if we have clipping on a stacking context with compositing children.
+ OwnPtr<GraphicsLayer> m_childTransformLayer; // Only used if we have perspective and no m_childContainmentLayer.
OwnPtr<GraphicsLayer> m_scrollingLayer; // Only used if the layer is using composited scrolling.
OwnPtr<GraphicsLayer> m_scrollingContentsLayer; // Only used if the layer is using composited scrolling.
OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar;
OwnPtr<GraphicsLayer> m_layerForScrollCorner;
- OwnPtr<WebAnimationProvider> m_animationProvider;
-
OwnPtr<GraphicsLayer> m_squashingContainmentLayer; // Only used if any squashed layers exist, to contain the squashed layers as siblings to the rest of the GraphicsLayer tree chunk.
OwnPtr<GraphicsLayer> m_squashingLayer; // Only used if any squashed layers exist, this is the backing that squashed layers paint into.
Vector<GraphicsLayerPaintInfo> m_squashedLayers;