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

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

Issue 2821323002: Optimize offscreen animation: don't update paint properties/visual rects (Closed)
Patch Set: Add unit test Created 3 years, 8 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 | third_party/WebKit/Source/core/layout/LayoutImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 92f2ff031cc5d54709b9ef5544257e8daa7354b3..2b8a93e18f42f1e0641942d73c12bab95471f84b 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1753,7 +1753,7 @@ void LayoutBox::PaintMask(const PaintInfo& paint_info,
}
void LayoutBox::ImageChanged(WrappedImagePtr image, const IntRect*) {
- // TODO(chrishtr): support PaintInvalidationDelayedFull for animated border
+ // TODO(chrishtr): support kPaintInvalidationDelayedFull for animated border
// images.
if ((StyleRef().BorderImage().GetImage() &&
StyleRef().BorderImage().GetImage()->Data() == image) ||
@@ -1875,14 +1875,11 @@ void LayoutBox::EnsureIsReadyForPaintInvalidation() {
return;
// Do regular full paint invalidation if the object with
- // PaintInvalidationDelayedFull is onscreen.
- if (IntersectsVisibleViewport()) {
- // Conservatively assume the delayed paint invalidation was caused by
- // background image change.
- SetBackgroundChangedSinceLastPaintInvalidation();
- SetShouldDoFullPaintInvalidationWithoutGeometryChange(
- kPaintInvalidationFull);
- }
+ // kPaintInvalidationDelayedFull is onscreen.
+ // Conservatively assume the delayed paint invalidation was caused by
+ // background image change.
+ SetBackgroundChangedSinceLastPaintInvalidation();
+ SetShouldDoFullPaintInvalidationWithoutGeometryChange(kPaintInvalidationFull);
}
PaintInvalidationReason LayoutBox::InvalidatePaintIfNeeded(
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698