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

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

Issue 2732573003: Skip paint property update and visual rect update if no geometry change (Closed)
Patch Set: - Created 3 years, 9 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/PaintPropertyTreeBuilder.h
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h
index dd18716e32bfe85f90e4a2b45ca2ff2f09199630..c3474d0d320dd40c6724792a6aba3f6cadd9396a 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h
@@ -22,6 +22,17 @@ class LayoutObject;
// It's responsible for bookkeeping tree state in other order, for example, the
// most recent position container seen.
struct PaintPropertyTreeBuilderContext {
+#if DCHECK_IS_ON()
+ PaintPropertyTreeBuilderContext() {}
+ PaintPropertyTreeBuilderContext(
+ const PaintPropertyTreeBuilderContext& parent) {
+ *this = parent;
+ parentUpdated = parent.updatedForSelf && parent.updatedForChildren;
+ updatedForSelf = false;
+ updatedForChildren = false;
+ }
+#endif
+
// State that propagates on the containing block chain (and so is adjusted
// when an absolute or fixed position object is encountered).
struct ContainingBlockContext {
@@ -86,6 +97,12 @@ struct PaintPropertyTreeBuilderContext {
// can be set due to paint offset changes or when the structure of the
// property tree changes (i.e., a node is added or removed).
bool forceSubtreeUpdate = false;
+
+#if DCHECK_IS_ON()
+ bool parentUpdated = false;
+ bool updatedForSelf = false;
+ bool updatedForChildren = false;
+#endif
};
// Creates paint property tree nodes for special things in the layout tree.

Powered by Google App Engine
This is Rietveld 408576698