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

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

Issue 2033183002: [SPv2] Paint invalidation in PreWalkTreeWalk, plumbed on PaintInvalidationState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@RootFrame
Patch Set: Created 4 years, 6 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
new file mode 100644
index 0000000000000000000000000000000000000000..3edca170fe6c0d2e738f5bc8fa67987095ac91e3
--- /dev/null
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.h
@@ -0,0 +1,37 @@
+// Copyright 2016 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 PaintInvalidator_h
+#define PaintInvalidator_h
+
+#include "core/layout/PaintInvalidationState.h"
+#include "wtf/Optional.h"
+#include "wtf/Vector.h"
+
+namespace blink {
+
+class FrameView;
+class LayoutObject;
+struct PaintPropertyTreeBuilderContext;
+
+// TODO(wangxianzhu): Move applicable PaintInvalidationState code into PaintInvalidator.
+using PaintInvalidatorContext = PaintInvalidationState;
+
+class PaintInvalidator {
+public:
+ // TODO(wangxianzhu): Avoid Optional<> by using copy-and-update pattern for PaintInvalidatorContext.
+ void invalidatePaintIfNeeded(FrameView&, const PaintPropertyTreeBuilderContext&, Optional<PaintInvalidatorContext>&);
+ void invalidatePaintIfNeeded(const LayoutObject&, const PaintPropertyTreeBuilderContext&, const PaintInvalidatorContext&, Optional<PaintInvalidatorContext>&);
+
+ // Process objects needing paint invalidation on the next frame.
+ // See the definition of PaintInvalidationDelayedFull for more details.
+ void processPendingDelayedPaintInvalidations();
+
+private:
+ Vector<const LayoutObject*> m_pendingDelayedPaintInvalidations;
+};
+
+} // namespace blink
+
+#endif // PaintInvalidator_h

Powered by Google App Engine
This is Rietveld 408576698