Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(808)

Unified Diff: Source/core/rendering/RenderLayerCompositor.h

Issue 26110004: Defer the real work in updateCompositingLayers until it's really needed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: patch for landing Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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*);
+
// 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;
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698