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

Unified Diff: third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp

Issue 2247543003: Tweak priorities of paint invalidation reasons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NeedsRebaseline (for win and mac) 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/paint/BoxPaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp
index a1625c3af3e9e00c5a9f149d6868482d0e95d497..04b3f8d23f47280a96b2335b2a011b749bfccc8f 100644
--- a/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp
@@ -105,7 +105,7 @@ PaintInvalidationReason BoxPaintInvalidator::computePaintInvalidationReason()
{
PaintInvalidationReason reason = ObjectPaintInvalidator(m_box, m_context).computePaintInvalidationReason();
- if (reason != PaintInvalidationDelayedFull && isFullPaintInvalidationReason(reason))
+ if (isImmediateFullPaintInvalidationReason(reason) || reason == PaintInvalidationNone)
return reason;
if (m_box.mayNeedPaintInvalidationAnimatedBackgroundImage() && !m_box.backgroundIsKnownToBeObscured())
@@ -164,11 +164,6 @@ PaintInvalidationReason BoxPaintInvalidator::computePaintInvalidationReason()
if (oldBorderBoxSize == newBorderBoxSize)
return reason;
- // LayoutBox::incrementallyInvalidatePaint() depends on positionFromPaintInvalidationBacking
- // which is not available when slimmingPaintOffsetCachingEnabled.
- if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && (style.hasBoxDecorations() || style.hasBackground()))
- return PaintInvalidationBorderBoxChange;
-
// See another hasNonCompositedScrollbars() callsite above.
if (m_box.hasNonCompositedScrollbars())
return PaintInvalidationBorderBoxChange;
@@ -190,7 +185,7 @@ PaintInvalidationReason BoxPaintInvalidator::computePaintInvalidationReason()
if (oldBorderBoxSize.height() != newBorderBoxSize.height() && m_box.mustInvalidateBackgroundOrBorderPaintOnHeightChange())
return PaintInvalidationBorderBoxChange;
- if (reason == PaintInvalidationNone && (style.hasBackground() || style.hasBoxDecorations()))
+ if (reason == PaintInvalidationProbablyNone && (style.hasBackground() || style.hasBoxDecorations()))
pdr. 2016/08/15 23:37:42 Could we just return PaintInvalidationIncremental
Xianzhu 2016/08/16 01:13:54 Added comments in PaintInvalidationReason.h. For
reason = PaintInvalidationIncremental;
return reason;

Powered by Google App Engine
This is Rietveld 408576698