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

Unified Diff: third_party/WebKit/Source/core/paint/PaintInvalidator.h

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/PaintInvalidator.h
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.h b/third_party/WebKit/Source/core/paint/PaintInvalidator.h
index c3e1cc72dbfad7dddf1637845733cec4e7886081..00e4447adaafeac4ad6764d4aa6f70ac12366486 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidator.h
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.h
@@ -20,8 +20,7 @@ struct PaintInvalidatorContext {
PaintInvalidatorContext(const PaintInvalidatorContext& parent_context)
: parent_context(&parent_context),
- forced_subtree_invalidation_flags(
- parent_context.forced_subtree_invalidation_flags),
+ subtree_flags(parent_context.subtree_flags),
paint_invalidation_container(
parent_context.paint_invalidation_container),
paint_invalidation_container_for_stacked_contents(
@@ -41,35 +40,33 @@ struct PaintInvalidatorContext {
return true;
#endif
return object.NeedsPaintOffsetAndVisualRectUpdate() ||
- (forced_subtree_invalidation_flags &
- PaintInvalidatorContext::kForcedSubtreeVisualRectUpdate);
+ (subtree_flags & PaintInvalidatorContext::kSubtreeVisualRectUpdate);
}
const PaintInvalidatorContext* parent_context;
- enum ForcedSubtreeInvalidationFlag {
- kForcedSubtreeInvalidationChecking = 1 << 0,
- kForcedSubtreeVisualRectUpdate = 1 << 1,
- kForcedSubtreeFullInvalidation = 1 << 2,
- kForcedSubtreeFullInvalidationForStackedContents = 1 << 3,
- kForcedSubtreeSVGResourceChange = 1 << 4,
+ enum SubtreeFlag {
+ kSubtreeInvalidationChecking = 1 << 0,
+ kSubtreeVisualRectUpdate = 1 << 1,
+ kSubtreeFullInvalidation = 1 << 2,
+ kSubtreeFullInvalidationForStackedContents = 1 << 3,
+ kSubtreeSVGResourceChange = 1 << 4,
// TODO(crbug.com/637313): This is temporary before we support filters in
// paint property tree.
- kForcedSubtreeSlowPathRect = 1 << 5,
+ kSubtreeSlowPathRect = 1 << 5,
- // The paint invalidation tree walk invalidates paint caches, such as
- // DisplayItemClients and subsequence caches, and also the regions
- // into which objects raster pixels. When this flag is set, raster region
- // invalidations are not issued.
+ // When this flag is set, no paint or raster invalidation will be issued
+ // for the subtree.
//
// Context: some objects in this paint walk, for example SVG resource
- // container subtress, don't actually have any raster regions, because they
- // are used as "painting subroutines" for one or more other locations in
- // SVG.
- kForcedSubtreeNoRasterInvalidation = 1 << 6,
+ // container subtrees, always paint onto temporary PaintControllers which
+ // don't have cache, and don't actually have any raster regions, so they
+ // don't need any invalidation. They are used as "painting subroutines"
+ // for one or more other locations in SVG.
+ kSubtreeNoInvalidation = 1 << 6,
};
- unsigned forced_subtree_invalidation_flags = 0;
+ unsigned subtree_flags = 0;
// The following fields can be null only before
// PaintInvalidator::updateContext().

Powered by Google App Engine
This is Rietveld 408576698