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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp

Issue 2328413002: Cleanups of PaintController (Closed)
Patch Set: - Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/PaintController.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
index 60a818a51d108c4e1a2b17c304a2459d7c73b17f..833198a060895d633a0b580c5e0ebc1385c18d77 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
@@ -701,20 +701,24 @@ String PaintController::displayItemListAsDebugString(const DisplayItemList& list
stringBuilder.append(String::format("{index: %zu, ", i));
#ifndef NDEBUG
displayItem.dumpPropertiesAsDebugString(stringBuilder);
-#else
- stringBuilder.append(String::format("clientDebugName: %s", displayItem.client().debugName().ascii().data()));
#endif
+
if (displayItem.hasValidClient()) {
- do {
#if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
- if (!displayItem.client().isAlive()) {
- stringBuilder.append(", clientIsAlive: false");
- break;
- }
+ if (!displayItem.client().isAlive()) {
+ stringBuilder.append(", clientIsAlive: false");
+ } else {
+#else
+ // debugName() and clientCacheIsValid() can only be called on alive client, so only output it for
+ // m_newDisplayItemList in which we are sure the clients are all alive.
+ if (&list == &m_newDisplayItemList) {
+#endif
+#ifdef NDEBUG
+ stringBuilder.append(String::format("clientDebugName: \"%s\"", displayItem.client().debugName().ascii().data()));
#endif
stringBuilder.append(", cacheIsValid: ");
stringBuilder.append(clientCacheIsValid(displayItem.client()) ? "true" : "false");
- } while (false);
+ }
#ifndef NDEBUG
if (showPictures && displayItem.isDrawing()) {
if (const SkPicture* picture = static_cast<const DrawingDisplayItem&>(displayItem).picture()) {
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/PaintController.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698