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

Unified Diff: tools/DumpRecord.cpp

Issue 1606293002: teach dump_record to recurse into subpictures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/DumpRecord.cpp
diff --git a/tools/DumpRecord.cpp b/tools/DumpRecord.cpp
index e2662e758c96569206a4f4b56c9f34613c063f7e..e7d76f05155fe8ef6cff396b38a7fadceabb8403 100644
--- a/tools/DumpRecord.cpp
+++ b/tools/DumpRecord.cpp
@@ -60,6 +60,21 @@ public:
++fIndent;
}
+ void print(const SkRecords::DrawPicture& command, double ns) {
+ this->printNameAndTime(command, ns);
+
+ if (auto bp = command.picture->asSkBigPicture()) {
+ ++fIndent;
+
+ const SkRecord& record = *bp->record();
+ for (int i = 0; i < record.count(); i++) {
+ record.visit<void>(i, *this);
+ }
+
+ --fIndent;
+ }
+ }
+
private:
template <typename T>
void printNameAndTime(const T& command, double ns) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698