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

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

Issue 2854493002: Store previous painting clip rects on FragmentData. (Closed)
Patch Set: none Created 3 years, 8 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/PrePaintTreeWalk.h
diff --git a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h
index 4e6e9893d6ea7ae5f42a8c24e88a269a6ffc2717..ea80c3c316c912c9a8d67c05560409cd7c941c54 100644
--- a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h
+++ b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h
@@ -19,7 +19,7 @@ struct PrePaintTreeWalkContext;
// This class walks the whole layout tree, beginning from the root FrameView,
// across frame boundaries. Helper classes are called for each tree node to
// perform actual actions. It expects to be invoked in InPrePaint phase.
-class PrePaintTreeWalk {
+class CORE_EXPORT PrePaintTreeWalk {
public:
PrePaintTreeWalk() {}
void Walk(FrameView& root_frame);
@@ -34,6 +34,13 @@ class PrePaintTreeWalk {
const LayoutObject&,
PrePaintTreeWalkContext&);
+ // Returns true if we should force checking subtree invalidation flags.
+ ALWAYS_INLINE bool InvalidatePaintLayerOptimizationsForFragment(
+ const LayoutObject&,
+ const PaintLayer* ancestor_transformed_or_root_paint_layer,
+ const PaintPropertyTreeBuilderFragmentContext&,
+ FragmentData&);
+
// Returns the clip applied to children for the given containing block context
// + effect, in the space of ancestorState adjusted by ancestorPaintOffset.
ALWAYS_INLINE LayoutRect ComputeClipRectForContext(
@@ -49,8 +56,12 @@ class PrePaintTreeWalk {
NeedsTreeBuilderContextUpdate(const LayoutObject&,
const PrePaintTreeWalkContext&);
+ static void ClearPreviousClipRectsForTesting(const LayoutObject&);
+
PaintPropertyTreeBuilder property_tree_builder_;
PaintInvalidator paint_invalidator_;
+
+ FRIEND_TEST_ALL_PREFIXES(PrePaintTreeWalkTest, ClipRects);
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698