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

Side by Side Diff: Source/platform/graphics/paint/DisplayItem.h

Issue 892293002: First version of new merge algorithm (not enabled yet) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Traverse indices vector 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DisplayItem_h 5 #ifndef DisplayItem_h
6 #define DisplayItem_h 6 #define DisplayItem_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/graphics/paint/DisplayItemClient.h" 9 #include "platform/graphics/paint/DisplayItemClient.h"
10 #include "wtf/Assertions.h" 10 #include "wtf/Assertions.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 EndScrollLast = EndScrollFirst + ScrollLast - ScrollFirst, 114 EndScrollLast = EndScrollFirst + ScrollLast - ScrollFirst,
115 115
116 BeginFilter, 116 BeginFilter,
117 EndFilter, 117 EndFilter,
118 BeginCompositing, 118 BeginCompositing,
119 EndCompositing, 119 EndCompositing,
120 BeginTransform, 120 BeginTransform,
121 EndTransform, 121 EndTransform,
122 BeginClipPath, 122 BeginClipPath,
123 EndClipPath, 123 EndClipPath,
124
125 SubtreeCachedFirst,
126 SubtreeCachedPaintPhaseFirst = SubtreeCachedFirst,
127 SubtreeCachedPaintPhaseLast = SubtreeCachedPaintPhaseFirst + PaintPhaseM ax,
128 SubtreeCachedLast = SubtreeCachedPaintPhaseLast,
129
130 BeginSubtreeFirst,
131 BeginSubtreePaintPhaseFirst = BeginSubtreeFirst,
132 BeginSubtreePaintPhaseLast = BeginSubtreePaintPhaseFirst + PaintPhaseMax ,
133 BeginSubtreeLast = BeginSubtreePaintPhaseLast,
134
135 EndSubtreeFirst,
136 EndSubtreePaintPhaseFirst = EndSubtreeFirst,
137 EndSubtreePaintPhaseLast = EndSubtreePaintPhaseFirst + PaintPhaseMax,
138 EndSubtreeLast = EndSubtreePaintPhaseLast,
124 }; 139 };
125 140
126 // Create a dummy display item which just holds the id but has no display op eration.
127 // It helps a CachedDisplayItem to match the corresponding original empty di splay item.
128 static PassOwnPtr<DisplayItem> create(DisplayItemClient client, Type type) { return adoptPtr(new DisplayItem(client, type)); }
129
130 virtual ~DisplayItem() { } 141 virtual ~DisplayItem() { }
131 142
132 virtual void replay(GraphicsContext*) { } 143 virtual void replay(GraphicsContext*) { }
133 144
134 DisplayItemClient client() const { return m_id.client; } 145 DisplayItemClient client() const { return m_id.client; }
135 Type type() const { return m_id.type; } 146 Type type() const { return m_id.type; }
136 bool idsEqual(const DisplayItem& other) const { return m_id.client == other. m_id.client && m_id.type == other.m_id.type; } 147 bool idsEqual(const DisplayItem& other) const { return m_id.client == other. m_id.client && m_id.type == other.m_id.type; }
137 148
138 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const { } 149 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const { }
139 150
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipLayerFragment) 189 DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipLayerFragment)
179 DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipBox) 190 DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipBox)
180 DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipColumnBounds) 191 DEFINE_PAINT_PHASE_CONVERSION_METHOD(ClipColumnBounds)
181 192
182 DEFINE_PAIRED_CATEGORY_METHODS(FloatClip, floatClip) 193 DEFINE_PAIRED_CATEGORY_METHODS(FloatClip, floatClip)
183 DEFINE_PAINT_PHASE_CONVERSION_METHOD(FloatClip) 194 DEFINE_PAINT_PHASE_CONVERSION_METHOD(FloatClip)
184 195
185 DEFINE_PAIRED_CATEGORY_METHODS(Scroll, scroll) 196 DEFINE_PAIRED_CATEGORY_METHODS(Scroll, scroll)
186 DEFINE_PAINT_PHASE_CONVERSION_METHOD(Scroll) 197 DEFINE_PAINT_PHASE_CONVERSION_METHOD(Scroll)
187 198
199 DEFINE_CATEGORY_METHODS(SubtreeCached)
200 DEFINE_PAINT_PHASE_CONVERSION_METHOD(SubtreeCached)
201 DEFINE_CATEGORY_METHODS(BeginSubtree)
202 DEFINE_PAINT_PHASE_CONVERSION_METHOD(BeginSubtree)
203 DEFINE_CATEGORY_METHODS(EndSubtree)
204 DEFINE_PAINT_PHASE_CONVERSION_METHOD(EndSubtree)
205 DEFINE_CONVERSION_METHODS(SubtreeCached, subtreeCached, BeginSubtree, beginS ubtree)
206 DEFINE_CONVERSION_METHODS(SubtreeCached, subtreeCached, EndSubtree, endSubtr ee)
207 DEFINE_CONVERSION_METHODS(BeginSubtree, beginSubtree, EndSubtree, endSubtree )
208
188 #ifndef NDEBUG 209 #ifndef NDEBUG
189 static WTF::String typeAsDebugString(DisplayItem::Type); 210 static WTF::String typeAsDebugString(DisplayItem::Type);
190 211
191 void setClientDebugString(const WTF::String& clientDebugString) { m_clientDe bugString = clientDebugString; } 212 void setClientDebugString(const WTF::String& clientDebugString) { m_clientDe bugString = clientDebugString; }
192 const WTF::String& clientDebugString() const { return m_clientDebugString; } 213 const WTF::String& clientDebugString() const { return m_clientDebugString; }
193 214
194 WTF::String asDebugString() const; 215 WTF::String asDebugString() const;
195 virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const; 216 virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const;
196 #endif 217 #endif
197 218
(...skipping 17 matching lines...) Expand all
215 const Type type; 236 const Type type;
216 } m_id; 237 } m_id;
217 #ifndef NDEBUG 238 #ifndef NDEBUG
218 WTF::String m_clientDebugString; 239 WTF::String m_clientDebugString;
219 #endif 240 #endif
220 }; 241 };
221 242
222 } 243 }
223 244
224 #endif // DisplayItem_h 245 #endif // DisplayItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698