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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SubtreeDisplayItem_h
6 #define SubtreeDisplayItem_h
7
8 #include "platform/geometry/FloatRect.h"
9 #include "platform/graphics/paint/DisplayItem.h"
10 #include "wtf/Assertions.h"
11
12 namespace blink {
13
14 class PLATFORM_EXPORT SubtreeCachedDisplayItem : public DisplayItem {
15 WTF_MAKE_FAST_ALLOCATED;
16 public:
17 static PassOwnPtr<SubtreeCachedDisplayItem> create(DisplayItemClient client, Type type)
18 {
19 return adoptPtr(new SubtreeCachedDisplayItem(client, type));
20 }
21
22 private:
23 SubtreeCachedDisplayItem(DisplayItemClient client, Type type)
24 : DisplayItem(client, type)
25 {
26 ASSERT(isSubtreeCachedType(type));
27 }
28
29 // SubtreeCachedDisplayItem is never replayed or appended to WebDisplayItemL ist.
30 virtual void replay(GraphicsContext*) final { ASSERT_NOT_REACHED(); }
31 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const final { A SSERT_NOT_REACHED(); }
32 };
33
34 class PLATFORM_EXPORT BeginSubtreeDisplayItem : public DisplayItem {
35 WTF_MAKE_FAST_ALLOCATED;
36 public:
37 static PassOwnPtr<BeginSubtreeDisplayItem> create(DisplayItemClient client, Type type)
38 {
39 return adoptPtr(new BeginSubtreeDisplayItem(client, type));
40 }
41
42 private:
43 BeginSubtreeDisplayItem(DisplayItemClient client, Type type)
44 : DisplayItem(client, type)
45 {
46 ASSERT(isBeginSubtreeType(type));
47 }
48 };
49
50 class PLATFORM_EXPORT EndSubtreeDisplayItem : public DisplayItem {
51 WTF_MAKE_FAST_ALLOCATED;
52 public:
53 static PassOwnPtr<EndSubtreeDisplayItem> create(DisplayItemClient client, Ty pe type)
54 {
55 return adoptPtr(new EndSubtreeDisplayItem(client, type));
56 }
57
58 private:
59 EndSubtreeDisplayItem(DisplayItemClient client, Type type)
60 : DisplayItem(client, type)
61 {
62 ASSERT(isEndSubtreeType(type));
63 }
64 };
65
66 } // namespace blink
67
68 #endif // SubtreeDisplayItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698