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

Unified Diff: Source/core/rendering/RenderBox.cpp

Issue 478433002: Avoid RenderObject::paintInvalidationForWholeRenderer() if possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: TestExpectations Created 6 years, 4 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/RenderBlock.cpp ('k') | Source/core/rendering/RenderFileUploadControl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index a10213e9b2ac889b411bda604ef403bf3f5fb766..6f77287bfa06ee3bfbfe97a9eb1c7f1117e9064e 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -146,7 +146,7 @@ void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle& newStyl
// the canvas. Just dirty the entire canvas when our style changes substantially.
if ((diff.needsPaintInvalidation() || diff.needsLayout()) && node()
&& (isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) {
- view()->paintInvalidationForWholeRenderer();
+ view()->setShouldDoFullPaintInvalidation(true);
if (oldStyle->hasEntirelyFixedBackground() != newStyle.hasEntirelyFixedBackground())
view()->compositor()->setNeedsUpdateFixedBackground();
@@ -157,7 +157,7 @@ void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle& newStyl
if (diff.needsFullLayout() && parent() && oldStyle->position() != newStyle.position()) {
markContainingBlocksForLayout();
if (oldStyle->position() == StaticPosition)
- paintInvalidationForWholeRenderer();
+ setShouldDoFullPaintInvalidation(true);
else if (newStyle.hasOutOfFlowPosition())
parent()->setChildNeedsLayout();
if (isFloating() && !isOutOfFlowPositioned() && newStyle.hasOutOfFlowPosition())
@@ -166,7 +166,7 @@ void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle& newStyl
// FIXME: This branch runs when !oldStyle, which means that layout was never called
// so what's the point in invalidating the whole view that we never painted?
} else if (isBody()) {
- view()->paintInvalidationForWholeRenderer();
+ view()->setShouldDoFullPaintInvalidation(true);
}
RenderBoxModelObject::styleWillChange(diff, newStyle);
@@ -1471,7 +1471,7 @@ void RenderBox::imageChanged(WrappedImagePtr image, const IntRect*)
if ((style()->borderImage().image() && style()->borderImage().image()->data() == image) ||
(style()->maskBoxImage().image() && style()->maskBoxImage().image()->data() == image)) {
- paintInvalidationForWholeRenderer();
+ setShouldDoFullPaintInvalidation(true);
return;
}
@@ -1523,7 +1523,7 @@ bool RenderBox::paintInvalidationLayerRectsForImage(WrappedImagePtr image, const
if (geometry.hasNonLocalGeometry()) {
// Rather than incur the costs of computing the paintContainer for renderers with fixed backgrounds
// in order to get the right destRect, just issue paint invalidations for the entire renderer.
- layerRenderer->paintInvalidationForWholeRenderer();
+ layerRenderer->setShouldDoFullPaintInvalidation(true);
return true;
}
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderFileUploadControl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698