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

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

Issue 1774193002: New paint invalidation using paint property tree walk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/PrePaintTreeWalk.h
diff --git a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h
new file mode 100644
index 0000000000000000000000000000000000000000..4f1f7666d6fe307862b64c058574706d832ec655
--- /dev/null
+++ b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h
@@ -0,0 +1,42 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PrePaintTreeWalk_h
+#define PrePaintTreeWalk_h
+
+#include "wtf/Vector.h"
+
+namespace blink {
+
+class FrameView;
+class LayoutObject;
+class PaintInvalidationState;
+struct PrePaintTreeWalkContext;
+
+// This class walks layout and frame trees in primary tree order (think DOM order),
+// beginning from the root FrameView and acrossing frame boundaries. The walk is
+// used to create paint property tree nodes for layout & frame properties such as
+// clips and transforms. It should be invoked after layout, during
+// InPrePaintTreeWalk document lifecycle state.
+//
+// If RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled, we also invalidate
+// paint along the way.
+class PrePaintTreeWalk {
+public:
+ void buildPropertyTreesAndInvalidatePaint(FrameView& rootFrame);
+
+ // Objects requiring invalidation after the phase of paint invalidation.
+ // See the definition of PaintInvalidationDelayedFull (PaintInvalidationReason.h) for more detail.
+ const Vector<LayoutObject*>& pendingDelayedPaintInvalidations() const { return m_pendingDelayedPaintInvalidations; }
+
+private:
+ void walk(FrameView&, const PrePaintTreeWalkContext&, const PaintInvalidationState*);
+ void walk(const LayoutObject&, const PrePaintTreeWalkContext&, const PaintInvalidationState*);
+
+ Vector<LayoutObject*> m_pendingDelayedPaintInvalidations;
+};
+
+} // namespace blink
+
+#endif // PrePaintTreeWalk_h

Powered by Google App Engine
This is Rietveld 408576698