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

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

Issue 2515113002: WIP: Prune the prepaint tree walk (Closed)
Patch Set: Created 4 years, 1 month 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/PaintPropertyTreeBuilder.h
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h
index 29d89b7dfd80bde2a663b560b189156ba1447b57..9f6fd6575f6764cad8d94665bd054533be86283f 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h
@@ -14,6 +14,13 @@
namespace blink {
+enum TreeStructureChange {
+ // Nodes were not added or removed.
+ StructureNotChanged = false,
+ // Nodes were added or removed.
+ StructureChanged = true
+};
+
class FrameView;
class LayoutObject;
@@ -84,45 +91,54 @@ class PaintPropertyTreeBuilder {
PaintPropertyTreeBuilderContext setupInitialContext();
// Update the paint properties for a frame and ensure the context is up to
// date.
- void updateProperties(FrameView&, PaintPropertyTreeBuilderContext&);
+ TreeStructureChange updateProperties(FrameView&,
+ PaintPropertyTreeBuilderContext&);
// Update the paint properties that affect this object (e.g., properties like
// paint offset translation) and ensure the context is up to date.
- void updatePropertiesForSelf(const LayoutObject&,
- PaintPropertyTreeBuilderContext&);
+ TreeStructureChange updatePropertiesForSelf(const LayoutObject&,
+ PaintPropertyTreeBuilderContext&);
// Update the paint properties that affect children of this object (e.g.,
// scroll offset transform) and ensure the context is up to date.
- void updatePropertiesForChildren(const LayoutObject&,
- PaintPropertyTreeBuilderContext&);
+ TreeStructureChange updatePropertiesForChildren(
+ const LayoutObject&,
+ PaintPropertyTreeBuilderContext&);
private:
- static void updatePaintOffsetTranslation(const LayoutObject&,
- PaintPropertyTreeBuilderContext&);
- static void updateTransform(const LayoutObject&,
- PaintPropertyTreeBuilderContext&);
- static void updateTransformForNonRootSVG(const LayoutObject&,
- PaintPropertyTreeBuilderContext&);
- static void updateEffect(const LayoutObject&,
- PaintPropertyTreeBuilderContext&);
- static void updateCssClip(const LayoutObject&,
- PaintPropertyTreeBuilderContext&);
- static void updateLocalBorderBoxContext(const LayoutObject&,
+ static void updatePaintOffsetTranslation(
+ const LayoutObject&,
+ PaintPropertyTreeBuilderContext&,
+ bool& treeStructureChanged);
+ static TreeStructureChange updateTransform(const LayoutObject&,
+ PaintPropertyTreeBuilderContext&);
+ static TreeStructureChange updateTransformForNonRootSVG(
+ const LayoutObject&,
+ PaintPropertyTreeBuilderContext&);
+ static TreeStructureChange updateEffect(const LayoutObject&,
PaintPropertyTreeBuilderContext&);
- static void updateScrollbarPaintOffset(
+ static TreeStructureChange updateCssClip(const LayoutObject&,
+ PaintPropertyTreeBuilderContext&);
+ static TreeStructureChange updateLocalBorderBoxContext(
+ const LayoutObject&,
+ PaintPropertyTreeBuilderContext&);
+ static TreeStructureChange updateScrollbarPaintOffset(
const LayoutObject&,
const PaintPropertyTreeBuilderContext&);
- static void updateOverflowClip(const LayoutObject&,
- PaintPropertyTreeBuilderContext&);
- static void updatePerspective(const LayoutObject&,
- PaintPropertyTreeBuilderContext&);
- static void updateSvgLocalToBorderBoxTransform(
+ static TreeStructureChange updateOverflowClip(
+ const LayoutObject&,
+ PaintPropertyTreeBuilderContext&);
+ static TreeStructureChange updatePerspective(
+ const LayoutObject&,
+ PaintPropertyTreeBuilderContext&);
+ static TreeStructureChange updateSvgLocalToBorderBoxTransform(
+ const LayoutObject&,
+ PaintPropertyTreeBuilderContext&);
+ static TreeStructureChange updateScrollAndScrollTranslation(
const LayoutObject&,
PaintPropertyTreeBuilderContext&);
- static void updateScrollAndScrollTranslation(
+ static TreeStructureChange updateOutOfFlowContext(
const LayoutObject&,
PaintPropertyTreeBuilderContext&);
- static void updateOutOfFlowContext(const LayoutObject&,
- PaintPropertyTreeBuilderContext&);
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698