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

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

Issue 1287863003: Avoid re-iterate out-of-order display items (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 DEBUG_STRING_CASE(BeginFixedPosition); 183 DEBUG_STRING_CASE(BeginFixedPosition);
184 DEBUG_STRING_CASE(EndFixedPosition); 184 DEBUG_STRING_CASE(EndFixedPosition);
185 DEBUG_STRING_CASE(BeginFixedPositionContainer); 185 DEBUG_STRING_CASE(BeginFixedPositionContainer);
186 DEBUG_STRING_CASE(EndFixedPositionContainer); 186 DEBUG_STRING_CASE(EndFixedPositionContainer);
187 DEFAULT_CASE; 187 DEFAULT_CASE;
188 } 188 }
189 } 189 }
190 190
191 WTF::String DisplayItem::asDebugString() const 191 WTF::String DisplayItem::asDebugString() const
192 { 192 {
193 if (!isValid())
194 return "null";
193 WTF::StringBuilder stringBuilder; 195 WTF::StringBuilder stringBuilder;
194 stringBuilder.append('{'); 196 stringBuilder.append('{');
195 dumpPropertiesAsDebugString(stringBuilder); 197 dumpPropertiesAsDebugString(stringBuilder);
196 stringBuilder.append('}'); 198 stringBuilder.append('}');
197 return stringBuilder.toString(); 199 return stringBuilder.toString();
198 } 200 }
199 201
200 void DisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringBuilder) const 202 void DisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringBuilder) const
201 { 203 {
204 ASSERT(isValid());
202 stringBuilder.append(String::format("client: \"%p", client())); 205 stringBuilder.append(String::format("client: \"%p", client()));
203 if (!clientDebugString().isEmpty()) { 206 if (!clientDebugString().isEmpty()) {
204 stringBuilder.append(' '); 207 stringBuilder.append(' ');
205 stringBuilder.append(clientDebugString()); 208 stringBuilder.append(clientDebugString());
206 } 209 }
207 stringBuilder.append("\", type: \""); 210 stringBuilder.append("\", type: \"");
208 stringBuilder.append(typeAsDebugString(type())); 211 stringBuilder.append(typeAsDebugString(type()));
209 stringBuilder.append('"'); 212 stringBuilder.append('"');
210 if (m_skippedCache) 213 if (m_skippedCache)
211 stringBuilder.append(", skippedCache: true"); 214 stringBuilder.append(", skippedCache: true");
212 if (m_scope) 215 if (m_scope)
213 stringBuilder.append(String::format(", scope: %d", m_scope)); 216 stringBuilder.append(String::format(", scope: %d", m_scope));
214 } 217 }
215 218
216 #endif 219 #endif
217 220
218 } // namespace blink 221 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/paint/DisplayItem.h ('k') | Source/platform/graphics/paint/DisplayItemList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698