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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/DisplayItem.cpp

Issue 2107103002: Find cached display items directly during painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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
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 #include "platform/graphics/paint/DisplayItem.h" 5 #include "platform/graphics/paint/DisplayItem.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 struct SameSizeAsDisplayItem { 9 struct SameSizeAsDisplayItem {
10 virtual ~SameSizeAsDisplayItem() { } // Allocate vtable pointer. 10 virtual ~SameSizeAsDisplayItem() { } // Allocate vtable pointer.
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 switch (type) { 176 switch (type) {
177 DEBUG_STRING_CASE(Transform3DElementTransform); 177 DEBUG_STRING_CASE(Transform3DElementTransform);
178 DEFAULT_CASE; 178 DEFAULT_CASE;
179 } 179 }
180 } 180 }
181 181
182 WTF::String DisplayItem::typeAsDebugString(Type type) 182 WTF::String DisplayItem::typeAsDebugString(Type type)
183 { 183 {
184 if (isDrawingType(type)) 184 if (isDrawingType(type))
185 return drawingTypeAsDebugString(type); 185 return drawingTypeAsDebugString(type);
186 if (isCachedDrawingType(type))
187 return "Cached" + drawingTypeAsDebugString(cachedDrawingTypeToDrawingTyp e(type));
188 186
189 if (isForeignLayerType(type)) 187 if (isForeignLayerType(type))
190 return foreignLayerTypeAsDebugString(type); 188 return foreignLayerTypeAsDebugString(type);
191 189
192 if (isClipType(type)) 190 if (isClipType(type))
193 return clipTypeAsDebugString(type); 191 return clipTypeAsDebugString(type);
194 if (isEndClipType(type)) 192 if (isEndClipType(type))
195 return "End" + clipTypeAsDebugString(endClipTypeToClipType(type)); 193 return "End" + clipTypeAsDebugString(endClipTypeToClipType(type));
196 194
197 if (type == UninitializedType) 195 if (type == UninitializedType)
(...skipping 17 matching lines...) Expand all
215 DEBUG_STRING_CASE(BeginFilter); 213 DEBUG_STRING_CASE(BeginFilter);
216 DEBUG_STRING_CASE(EndFilter); 214 DEBUG_STRING_CASE(EndFilter);
217 DEBUG_STRING_CASE(BeginCompositing); 215 DEBUG_STRING_CASE(BeginCompositing);
218 DEBUG_STRING_CASE(EndCompositing); 216 DEBUG_STRING_CASE(EndCompositing);
219 DEBUG_STRING_CASE(BeginTransform); 217 DEBUG_STRING_CASE(BeginTransform);
220 DEBUG_STRING_CASE(EndTransform); 218 DEBUG_STRING_CASE(EndTransform);
221 DEBUG_STRING_CASE(BeginClipPath); 219 DEBUG_STRING_CASE(BeginClipPath);
222 DEBUG_STRING_CASE(EndClipPath); 220 DEBUG_STRING_CASE(EndClipPath);
223 DEBUG_STRING_CASE(Subsequence); 221 DEBUG_STRING_CASE(Subsequence);
224 DEBUG_STRING_CASE(EndSubsequence); 222 DEBUG_STRING_CASE(EndSubsequence);
225 DEBUG_STRING_CASE(CachedSubsequence);
226 DEBUG_STRING_CASE(UninitializedType); 223 DEBUG_STRING_CASE(UninitializedType);
227 DEFAULT_CASE; 224 DEFAULT_CASE;
228 } 225 }
229 } 226 }
230 227
231 WTF::String DisplayItem::asDebugString() const 228 WTF::String DisplayItem::asDebugString() const
232 { 229 {
233 WTF::StringBuilder stringBuilder; 230 WTF::StringBuilder stringBuilder;
234 stringBuilder.append('{'); 231 stringBuilder.append('{');
235 dumpPropertiesAsDebugString(stringBuilder); 232 dumpPropertiesAsDebugString(stringBuilder);
(...skipping 18 matching lines...) Expand all
254 stringBuilder.append("\", type: \""); 251 stringBuilder.append("\", type: \"");
255 stringBuilder.append(typeAsDebugString(getType())); 252 stringBuilder.append(typeAsDebugString(getType()));
256 stringBuilder.append('"'); 253 stringBuilder.append('"');
257 if (m_skippedCache) 254 if (m_skippedCache)
258 stringBuilder.append(", skippedCache: true"); 255 stringBuilder.append(", skippedCache: true");
259 } 256 }
260 257
261 #endif 258 #endif
262 259
263 } // namespace blink 260 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698