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

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

Issue 1313223002: Simplify subtree (now subsequence) caching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 #include "config.h" 5 #include "config.h"
6 #include "platform/graphics/paint/DisplayItem.h" 6 #include "platform/graphics/paint/DisplayItem.h"
7 7
8 namespace blink { 8 namespace blink {
9 9
10 struct SameSizeAsDisplayItem { 10 struct SameSizeAsDisplayItem {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 PAINT_PHASE_BASED_DEBUG_STRINGS(Scroll); 175 PAINT_PHASE_BASED_DEBUG_STRINGS(Scroll);
176 if (isEndScrollType(type)) 176 if (isEndScrollType(type))
177 return "End" + typeAsDebugString(endScrollTypeToScrollType(type)); 177 return "End" + typeAsDebugString(endScrollTypeToScrollType(type));
178 178
179 if (isTransform3DType(type)) 179 if (isTransform3DType(type))
180 return transform3DTypeAsDebugString(type); 180 return transform3DTypeAsDebugString(type);
181 if (isEndTransform3DType(type)) 181 if (isEndTransform3DType(type))
182 return "End" + transform3DTypeAsDebugString(endTransform3DTypeToTransfor m3DType(type)); 182 return "End" + transform3DTypeAsDebugString(endTransform3DTypeToTransfor m3DType(type));
183 183
184 PAINT_PHASE_BASED_DEBUG_STRINGS(CachedSubtree);
185 PAINT_PHASE_BASED_DEBUG_STRINGS(BeginSubtree);
186 PAINT_PHASE_BASED_DEBUG_STRINGS(EndSubtree);
187
188 if (type == UninitializedType)
189 return "UninitializedType";
190
191 switch (type) { 184 switch (type) {
192 DEBUG_STRING_CASE(BeginFilter); 185 DEBUG_STRING_CASE(BeginFilter);
193 DEBUG_STRING_CASE(EndFilter); 186 DEBUG_STRING_CASE(EndFilter);
194 DEBUG_STRING_CASE(BeginCompositing); 187 DEBUG_STRING_CASE(BeginCompositing);
195 DEBUG_STRING_CASE(EndCompositing); 188 DEBUG_STRING_CASE(EndCompositing);
196 DEBUG_STRING_CASE(BeginTransform); 189 DEBUG_STRING_CASE(BeginTransform);
197 DEBUG_STRING_CASE(EndTransform); 190 DEBUG_STRING_CASE(EndTransform);
198 DEBUG_STRING_CASE(BeginClipPath); 191 DEBUG_STRING_CASE(BeginClipPath);
199 DEBUG_STRING_CASE(EndClipPath); 192 DEBUG_STRING_CASE(EndClipPath);
200 DEBUG_STRING_CASE(BeginFixedPosition); 193 DEBUG_STRING_CASE(BeginFixedPosition);
201 DEBUG_STRING_CASE(EndFixedPosition); 194 DEBUG_STRING_CASE(EndFixedPosition);
202 DEBUG_STRING_CASE(BeginFixedPositionContainer); 195 DEBUG_STRING_CASE(BeginFixedPositionContainer);
203 DEBUG_STRING_CASE(EndFixedPositionContainer); 196 DEBUG_STRING_CASE(EndFixedPositionContainer);
197 DEBUG_STRING_CASE(BeginSubtree);
198 DEBUG_STRING_CASE(EndSubtree);
199 DEBUG_STRING_CASE(CachedSubtree);
200 DEBUG_STRING_CASE(UninitializedType);
204 DEFAULT_CASE; 201 DEFAULT_CASE;
205 } 202 }
206 } 203 }
207 204
208 WTF::String DisplayItem::asDebugString() const 205 WTF::String DisplayItem::asDebugString() const
209 { 206 {
210 if (!isValid()) 207 if (!isValid())
211 return "null"; 208 return "null";
212 WTF::StringBuilder stringBuilder; 209 WTF::StringBuilder stringBuilder;
213 stringBuilder.append('{'); 210 stringBuilder.append('{');
(...skipping 15 matching lines...) Expand all
229 stringBuilder.append('"'); 226 stringBuilder.append('"');
230 if (m_skippedCache) 227 if (m_skippedCache)
231 stringBuilder.append(", skippedCache: true"); 228 stringBuilder.append(", skippedCache: true");
232 if (m_scope) 229 if (m_scope)
233 stringBuilder.append(String::format(", scope: %d", m_scope)); 230 stringBuilder.append(String::format(", scope: %d", m_scope));
234 } 231 }
235 232
236 #endif 233 #endif
237 234
238 } // namespace blink 235 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698