Index: Source/core/frame/FrameView.cpp |
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp |
index 7028b4aa100b78baf06075cc193ac4d75513c153..5305606a60e04451d7112b3cab757002ed94a86a 100644 |
--- a/Source/core/frame/FrameView.cpp |
+++ b/Source/core/frame/FrameView.cpp |
@@ -969,6 +969,21 @@ void FrameView::layout(bool allowSubtree) |
frame().page()->chrome().client().layoutUpdated(m_frame.get()); |
} |
+void FrameView::resetFirstPaintInvalidationFlag(RenderObject* layoutRoot) |
+{ |
+ /* |
+ bool isTracing; |
+ TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), &isTracing); |
+ if (!isTracing) |
kouhei (in TOK)
2014/08/21 11:20:39
FIXME: I need to limit this to only when TRACE_EVE
|
+ return; |
+ */ |
+ if (!layoutRoot->enclosingLayer()->hasCompositedLayerMapping()) |
+ return; |
+ |
+ if (GraphicsLayer* graphicsLayer = layoutRoot->enclosingLayer()->compositedLayerMapping()->mainGraphicsLayer()) |
+ graphicsLayer->resetIncludesFirstPaintInvalidationRecursive(); |
+} |
+ |
// The plan is to move to compositor-queried paint invalidation, in which case this |
// method would setNeedsRedraw on the GraphicsLayers with invalidations and |
// let the compositor pick which to actually draw. |
@@ -982,6 +997,7 @@ void FrameView::invalidateTreeIfNeeded() |
PaintInvalidationState rootPaintInvalidationState(*rootForPaintInvalidation); |
+ resetFirstPaintInvalidationFlag(rootForPaintInvalidation); |
rootForPaintInvalidation->invalidateTreeIfNeeded(rootPaintInvalidationState); |
// Invalidate the paint of the frameviews scrollbars if needed |