Chromium Code Reviews| Index: Source/core/rendering/RenderLayerCompositor.h |
| diff --git a/Source/core/rendering/RenderLayerCompositor.h b/Source/core/rendering/RenderLayerCompositor.h |
| index 9c479bd031707b3fcc9d2ddcbd3427a8a33eaa23..bb0f7e5942a9dab7c9c5cb7be3ef2e7f41443887 100644 |
| --- a/Source/core/rendering/RenderLayerCompositor.h |
| +++ b/Source/core/rendering/RenderLayerCompositor.h |
| @@ -46,7 +46,8 @@ enum CompositingUpdateType { |
| CompositingUpdateAfterStyleChange, |
| CompositingUpdateAfterLayout, |
| CompositingUpdateOnScroll, |
| - CompositingUpdateOnCompositedScroll |
| + CompositingUpdateOnCompositedScroll, |
| + CompositingUpdateFinishAllDeferredWork |
| }; |
| // RenderLayerCompositor manages the hierarchy of |
| @@ -91,7 +92,9 @@ public: |
| void updateCompositingRequirementsState(); |
| void setNeedsUpdateCompositingRequirementsState() { m_needsUpdateCompositingRequirementsState = true; } |
| - // Rebuild the tree of compositing layers |
| + // Main entry point for a full update. As needed, this function will compute compositing requirements, |
| + // rebuild the composited layer tree, and/or update all the properties assocaited with each layer of the |
| + // composited layer tree. |
| void updateCompositingLayers(CompositingUpdateType, RenderLayer* updateRoot = 0); |
| // Update the compositing state of the given layer. Returns true if that state changed. |
| @@ -200,7 +203,7 @@ public: |
| void resetTrackedRepaintRects(); |
| void setTracksRepaints(bool); |
| - void setShouldReevaluateCompositingAfterLayout() { m_reevaluateCompositingAfterLayout = true; } |
| + void setNeedsToRecomputeCompositingRequirements() { m_needsToRecomputeCompositingRequirements = true; } |
| // Returns all reasons (direct, indirectly due to subtree, and indirectly due to overlap) that a layer should be composited. |
| CompositingReasons reasonsForCompositing(const RenderLayer*) const; |
| @@ -238,6 +241,10 @@ private: |
| void addToOverlapMap(OverlapMap&, RenderLayer*, IntRect& layerBounds, bool& boundsComputed); |
| void addToOverlapMapRecursive(OverlapMap&, RenderLayer*, RenderLayer* ancestorLayer = 0); |
| + // Forces an update for all frames of frame tree recursively. Used only when the mainFrame compositor is ready to |
| + // finish all deferred work. |
| + static void finishCompositingUpdateForFrameTree(Frame*); |
|
jamesr
2013/10/18 15:56:42
why is this static? anything that has a Frame* ca
shawnsingh
2013/10/18 18:37:30
I made this static because earlier I was accidenta
|
| + |
| // Returns true if any layer's compositing changed |
| void computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer*, OverlapMap*, struct CompositingRecursionData&, bool& layersChanged, bool& descendantHas3DTransform, Vector<RenderLayer*>& unclippedDescendants); |
| @@ -317,9 +324,9 @@ private: |
| int m_compositedLayerCount; |
| bool m_showRepaintCounter; |
| - // When true, we have to wait until layout has happened before we can decide whether to enter compositing mode, |
| - // because only then do we know the final size of plugins and iframes. |
| - mutable bool m_reevaluateCompositingAfterLayout; |
| + // FIXME: This should absolutely not be mutable. |
| + mutable bool m_needsToRecomputeCompositingRequirements; |
| + bool m_needsToUpdateLayerTreeGeometry; |
| bool m_compositing; |
| bool m_compositingLayersNeedRebuild; |