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

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

Issue 2669003002: Optimize outline paint invalidation (Closed)
Patch Set: Rebaseline Created 3 years, 11 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 | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
index b566d57efae8cf1c6442700c188c39af9662c424..e41d807fd6544a6a94e17a77747946445fe5ea3e 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
@@ -488,14 +488,15 @@ ObjectPaintInvalidatorWithContext::computePaintInvalidationReason() {
if (m_object.paintedOutputOfObjectHasNoEffectRegardlessOfSize())
return PaintInvalidationNone;
- const ComputedStyle& style = m_object.styleRef();
-
// The outline may change shape because of position change of descendants. For
// simplicity, just force full paint invalidation if this object is marked for
chrishtr 2017/02/03 02:00:11 Comment needs updating.
Xianzhu 2017/02/03 04:38:35 Done.
// checking paint invalidation for any reason.
- // TODO(wangxianzhu): Optimize this.
- if (style.hasOutline())
+ if (m_object.outlineMayBeAffectedByDescendants() ||
+ m_object.previousOutlineMayBeAffectedByDescendants()) {
+ m_object.getMutableForPainting()
+ .updatePreviousOutlineMayBeAffectedByDescendants();
return PaintInvalidationOutline;
+ }
// If the size is zero on one of our bounds then we know we're going to have
// to do a full invalidation of either old bounds or new bounds.
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698