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

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

Issue 2324523003: Add PaintController::showDebugDataWithPictures() (Closed)
Patch Set: ndef NDEBUG 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 9b2140e2a59e41bdc5664144d2243c98be6e0024..ad364d6c30be38653f9e26e8bbb9d121eff88709 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
@@ -671,7 +671,7 @@ void PaintController::checkUnderInvalidation()
++m_underInvalidationCheckingBegin;
}
-String PaintController::displayItemListAsDebugString(const DisplayItemList& list) const
+String PaintController::displayItemListAsDebugString(const DisplayItemList& list, bool showPictures) const
{
StringBuilder stringBuilder;
size_t i = 0;
@@ -696,6 +696,14 @@ String PaintController::displayItemListAsDebugString(const DisplayItemList& list
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()) {
+ stringBuilder.append(", picture: ");
+ stringBuilder.append(pictureAsDebugString(picture));
+ }
+ }
+#endif
}
if (list.hasVisualRect(i)) {
IntRect visualRect = list.visualRect(i);
@@ -708,10 +716,10 @@ String PaintController::displayItemListAsDebugString(const DisplayItemList& list
return stringBuilder.toString();
}
-void PaintController::showDebugData() const
+void PaintController::showDebugDataInternal(bool showPictures) const
{
- WTFLogAlways("current display item list: [%s]\n", displayItemListAsDebugString(m_currentPaintArtifact.getDisplayItemList()).utf8().data());
- WTFLogAlways("new display item list: [%s]\n", displayItemListAsDebugString(m_newDisplayItemList).utf8().data());
+ WTFLogAlways("current display item list: [%s]\n", displayItemListAsDebugString(m_currentPaintArtifact.getDisplayItemList(), showPictures).utf8().data());
+ WTFLogAlways("new display item list: [%s]\n", displayItemListAsDebugString(m_newDisplayItemList, showPictures).utf8().data());
}
} // namespace blink
« 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