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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2732573003: Skip paint property update and visual rect update if no geometry change (Closed)
Patch Set: - Created 3 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
Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 07ed841b6da935df6fdf36130c64ed18d28fd807..61c84f7f6edece666f68e2512d13cddeca86b932 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1646,12 +1646,12 @@ void LayoutBox::imageChanged(WrappedImagePtr image, const IntRect*) {
styleRef().maskBoxImage().image()->data() == image) ||
(styleRef().boxReflect() && styleRef().boxReflect()->mask().image() &&
styleRef().boxReflect()->mask().image()->data() == image)) {
- setShouldDoFullPaintInvalidation();
+ setShouldDoFullPaintInvalidationWithoutGeometryChange();
} else {
for (const FillLayer* layer = &styleRef().maskLayers(); layer;
layer = layer->next()) {
if (layer->image() && image == layer->image()->data()) {
- setShouldDoFullPaintInvalidation();
+ setShouldDoFullPaintInvalidationWithoutGeometryChange();
break;
}
}
@@ -1669,7 +1669,7 @@ void LayoutBox::imageChanged(WrappedImagePtr image, const IntRect*) {
if (maybeAnimated) {
setMayNeedPaintInvalidationAnimatedBackgroundImage();
} else {
- setShouldDoFullPaintInvalidation();
+ setShouldDoFullPaintInvalidationWithoutGeometryChange();
setBackgroundChangedSinceLastPaintInvalidation();
}
break;
@@ -1750,8 +1750,10 @@ void LayoutBox::ensureIsReadyForPaintInvalidation() {
LayoutBoxModelObject::ensureIsReadyForPaintInvalidation();
if (mayNeedPaintInvalidationAnimatedBackgroundImage() &&
- !backgroundIsKnownToBeObscured())
- setShouldDoFullPaintInvalidation(PaintInvalidationDelayedFull);
+ !backgroundIsKnownToBeObscured()) {
+ setShouldDoFullPaintInvalidationWithoutGeometryChange(
+ PaintInvalidationDelayedFull);
+ }
if (fullPaintInvalidationReason() != PaintInvalidationDelayedFull ||
!intersectsVisibleViewport())
@@ -1763,7 +1765,8 @@ void LayoutBox::ensureIsReadyForPaintInvalidation() {
// Conservatively assume the delayed paint invalidation was caused by
// background image change.
setBackgroundChangedSinceLastPaintInvalidation();
- setShouldDoFullPaintInvalidation(PaintInvalidationFull);
+ setShouldDoFullPaintInvalidationWithoutGeometryChange(
+ PaintInvalidationFull);
}
}

Powered by Google App Engine
This is Rietveld 408576698