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

Unified Diff: Source/core/frame/FrameView.cpp

Issue 212553004: [repaint-after-layout] Skip invalidations if our RenderView did a full invalidation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « no previous file | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 8ec58d08914a74881c9cdea69332274fb6a15fda..964c34c03740429c6c1a8d8f8360a022f24187a2 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -1044,16 +1044,21 @@ void FrameView::repaintTree(RenderObject* root)
// Until those states are fully fledged, I'll just disable the ASSERTS.
DisableCompositingQueryAsserts disabler;
- for (RenderObject* renderer = root; renderer; renderer = renderer->nextInPreOrder()) {
- const LayoutRect& oldRepaintRect = renderer->oldRepaintRect();
- const LayoutRect& newRepaintRect = renderer->newRepaintRect();
-
- if ((renderer->onlyNeededPositionedMovementLayout() && renderer->compositingState() != PaintsIntoOwnBacking)
- || (renderer->shouldDoFullRepaintIfSelfPaintingLayer()
- && renderer->hasLayer()
- && toRenderLayerModelObject(renderer)->layer()->isSelfPaintingLayer())) {
- renderer->setShouldDoFullRepaintAfterLayout(true);
+ // If the RenderView did a full invalidation, skip issuing invalidations for
+ // the child RenderObjects as they will be covered by the RenderView invalidation.
+ if (root->isRenderView() && root->shouldDoFullRepaintAfterLayout()) {
Julien - ping for review 2014/03/31 20:00:56 I think we could simplify even further here as we
dsinclair 2014/03/31 20:10:24 Done.
+ root->repaintAfterLayoutIfNeeded(root->containerForRepaint(),
+ root->shouldDoFullRepaintAfterLayout(), root->oldRepaintRect(), &(root->newRepaintRect()));
+
+ // Clear the invalidation flags for the root and child renderers.
+ for (RenderObject* renderer = root; renderer; renderer = renderer->nextInPreOrder()) {
+ renderer->clearRepaintState();
}
+ return;
+ }
+
+ for (RenderObject* renderer = root; renderer; renderer = renderer->nextInPreOrder()) {
+ renderer->updateShouldDoFullRepaintAfterLayout();
Julien - ping for review 2014/03/31 20:00:56 I find that this function obfuscate the code as 'u
dsinclair 2014/03/31 20:10:24 Done.
// FIXME: Currently renderers with layers will get repainted when we call updateLayerPositionsAfterLayout.
// That call should be broken apart to position the layers be done before
@@ -1067,7 +1072,7 @@ void FrameView::repaintTree(RenderObject* root)
} else {
didFullRepaint = renderer->repaintAfterLayoutIfNeeded(renderer->containerForRepaint(),
- renderer->shouldDoFullRepaintAfterLayout(), oldRepaintRect, &newRepaintRect);
+ renderer->shouldDoFullRepaintAfterLayout(), renderer->oldRepaintRect(), &(renderer->newRepaintRect()));
}
if (!didFullRepaint)
« no previous file with comments | « no previous file | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698