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

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

Issue 2888253002: Skip both paint and raster invalidation for LayoutSVGHiddenContainer subtree (Closed)
Patch Set: Rebaseline-cl Created 3 years, 7 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/ObjectPaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
index 1cfafd3907518a8551167600b9bc925d9525e590..d621b30fde478c6c648982a78775be6ab7de3795 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
@@ -499,10 +499,6 @@ void ObjectPaintInvalidatorWithContext::InvalidatePaintRectangleWithContext(
if (rect.IsEmpty())
return;
- if (context_.forced_subtree_invalidation_flags &
- PaintInvalidatorContext::kForcedSubtreeNoRasterInvalidation)
- return;
-
// If the parent has fully invalidated and its visual rect covers this object
// on the same backing, skip the invalidation.
if (ParentFullyInvalidatedOnSameBacking() &&
@@ -527,8 +523,8 @@ ObjectPaintInvalidatorWithContext::ComputePaintInvalidationReason() {
background_obscuration_changed = true;
}
- if (context_.forced_subtree_invalidation_flags &
- PaintInvalidatorContext::kForcedSubtreeFullInvalidation)
+ if (context_.subtree_flags &
+ PaintInvalidatorContext::kSubtreeFullInvalidation)
return PaintInvalidationReason::kSubtree;
if (object_.ShouldDoFullPaintInvalidation())
@@ -626,6 +622,9 @@ DISABLE_CFI_PERF
PaintInvalidationReason
ObjectPaintInvalidatorWithContext::InvalidatePaintWithComputedReason(
PaintInvalidationReason reason) {
+ DCHECK(!(context_.subtree_flags &
+ PaintInvalidatorContext::kSubtreeNoInvalidation));
+
// We need to invalidate the selection before checking for whether we are
// doing a full invalidation. This is because we need to update the previous
// selection rect regardless.
@@ -638,8 +637,8 @@ ObjectPaintInvalidatorWithContext::InvalidatePaintWithComputedReason(
// stay the same) so no rect-based invalidation is issued. See
// crbug.com/508383 and crbug.com/515977.
if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() &&
- (context_.forced_subtree_invalidation_flags &
- PaintInvalidatorContext::kForcedSubtreeInvalidationChecking) &&
+ (context_.subtree_flags &
+ PaintInvalidatorContext::kSubtreeInvalidationChecking) &&
!object_.IsSVGChild()) {
// For SPv1, we conservatively assume the object changed paint offset
// except for non-root SVG whose paint offset is always zero.
@@ -648,8 +647,8 @@ ObjectPaintInvalidatorWithContext::InvalidatePaintWithComputedReason(
}
if (object_.IsSVG() &&
- (context_.forced_subtree_invalidation_flags &
- PaintInvalidatorContext::kForcedSubtreeSVGResourceChange)) {
+ (context_.subtree_flags &
+ PaintInvalidatorContext::kSubtreeSVGResourceChange)) {
reason = PaintInvalidationReason::kSVGResource;
break;
}

Powered by Google App Engine
This is Rietveld 408576698