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

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

Issue 2229643002: Don't invalidate paint on background image change if it's obscured (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@BackgroundObscured
Patch Set: Rebase Created 4 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
Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index b4c72b29f92030527a0baa5bdf0a32ba945ba01a..8d60773a2c63bd627934d9dc81a5ca65c9aab528 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1396,7 +1396,7 @@ PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(const PaintInvalid
invalidationReason = PaintInvalidationBackgroundObscurationChange;
m_bitfields.setPreviousBackgroundObscured(backgroundObscured);
- if (invalidationReason == PaintInvalidationNone) {
+ if (invalidationReason == PaintInvalidationNone || invalidationReason == PaintInvalidationDelayedFull) {
// TODO(trchen): Currently we don't keep track of paint offset of layout objects.
// There are corner cases that the display items need to be invalidated for paint offset
// mutation, but incurs no pixel difference (i.e. bounds stay the same) so no rect-based
@@ -3429,6 +3429,14 @@ void LayoutObject::setMayNeedPaintInvalidationSubtree()
setMayNeedPaintInvalidation();
}
+void LayoutObject::setMayNeedPaintInvalidationAnimatgedBackgroundImage()
+{
+ if (mayNeedPaintInvalidationAnimatedBackgroundImage())
+ return;
+ m_bitfields.setMayNeedPaintInvalidationAnimatedBackgroundImage(true);
+ setMayNeedPaintInvalidation();
+}
+
void LayoutObject::clearPaintInvalidationFlags(const PaintInvalidationState& paintInvalidationState)
{
// paintInvalidationStateIsDirty should be kept in sync with the
@@ -3438,6 +3446,7 @@ void LayoutObject::clearPaintInvalidationFlags(const PaintInvalidationState& pai
m_bitfields.setChildShouldCheckForPaintInvalidation(false);
m_bitfields.setMayNeedPaintInvalidation(false);
m_bitfields.setMayNeedPaintInvalidationSubtree(false);
+ m_bitfields.setMayNeedPaintInvalidationAnimatedBackgroundImage(false);
m_bitfields.setShouldInvalidateSelection(false);
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/platform/graphics/BitmapImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698