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

Unified Diff: Source/platform/graphics/paint/SubtreeDisplayItem.h

Issue 892293002: First version of new merge algorithm (not enabled yet) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove scope-related code (accidentally mixed in this CL) Created 5 years, 10 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: Source/platform/graphics/paint/SubtreeDisplayItem.h
diff --git a/Source/platform/graphics/paint/SubtreeDisplayItem.h b/Source/platform/graphics/paint/SubtreeDisplayItem.h
new file mode 100644
index 0000000000000000000000000000000000000000..ef3b354e79882bfb740e8a515e9292ed8f1827d1
--- /dev/null
+++ b/Source/platform/graphics/paint/SubtreeDisplayItem.h
@@ -0,0 +1,68 @@
+// 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 SubtreeDisplayItem_h
+#define SubtreeDisplayItem_h
+
+#include "platform/geometry/FloatRect.h"
+#include "platform/graphics/paint/DisplayItem.h"
+#include "wtf/Assertions.h"
+
+namespace blink {
+
+class PLATFORM_EXPORT SubtreeCachedDisplayItem : public DisplayItem {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ static PassOwnPtr<SubtreeCachedDisplayItem> create(DisplayItemClient client, Type type)
+ {
+ return adoptPtr(new SubtreeCachedDisplayItem(client, type));
+ }
+
+private:
+ SubtreeCachedDisplayItem(DisplayItemClient client, Type type)
+ : DisplayItem(client, type)
+ {
+ ASSERT(isSubtreeCachedType(type));
+ }
+
+ // SubtreeCachedDisplayItem is never replayed or appended to WebDisplayItemList.
+ virtual void replay(GraphicsContext*) final { ASSERT_NOT_REACHED(); }
+ virtual void appendToWebDisplayItemList(WebDisplayItemList*) const final { ASSERT_NOT_REACHED(); }
+};
+
+class PLATFORM_EXPORT BeginSubtreeDisplayItem : public DisplayItem {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ static PassOwnPtr<BeginSubtreeDisplayItem> create(DisplayItemClient client, Type type)
+ {
+ return adoptPtr(new BeginSubtreeDisplayItem(client, type));
+ }
+
+private:
+ BeginSubtreeDisplayItem(DisplayItemClient client, Type type)
+ : DisplayItem(client, type)
+ {
+ ASSERT(isBeginSubtreeType(type));
+ }
+};
+
+class PLATFORM_EXPORT EndSubtreeDisplayItem : public DisplayItem {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ static PassOwnPtr<EndSubtreeDisplayItem> create(DisplayItemClient client, Type type)
+ {
+ return adoptPtr(new EndSubtreeDisplayItem(client, type));
+ }
+
+private:
+ EndSubtreeDisplayItem(DisplayItemClient client, Type type)
+ : DisplayItem(client, type)
+ {
+ ASSERT(isEndSubtreeType(type));
+ }
+};
+
+} // namespace blink
+
+#endif // SubtreeDisplayItem_h

Powered by Google App Engine
This is Rietveld 408576698