aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/DumpRecord.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-01-20 08:46:40 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-20 08:46:40 -0800
commit3425cbaee16aface56eafd3e97aa60071a3fec85 (patch)
treed06de0fcce67ddaad9d6dffbe0a0657a5dc67584 /tools/DumpRecord.cpp
parent26def8687f9763dcc00ab3022aee4b86700970c1 (diff)
teach dump_record to recurse into subpictures
Diffstat (limited to 'tools/DumpRecord.cpp')
-rw-r--r--tools/DumpRecord.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/DumpRecord.cpp b/tools/DumpRecord.cpp
index e2662e758c..e7d76f0515 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) {