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

Side by Side Diff: tools/dump_record.cpp

Issue 265983007: Add dump_record to make inspecting before/after SkRecordOptimize easy. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: default cause Created 6 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 9
10 #include "LazyDecodeBitmap.h" 10 #include "LazyDecodeBitmap.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 putchar('\t'); 52 putchar('\t');
53 } 53 }
54 puts(NameOf(command)); 54 puts(NameOf(command));
55 } 55 }
56 56
57 template <typename T> 57 template <typename T>
58 static const char* NameOf(const T&) { 58 static const char* NameOf(const T&) {
59 #define CASE(U) case SkRecords::U##_Type: return #U; 59 #define CASE(U) case SkRecords::U##_Type: return #U;
60 switch(T::kType) { SK_RECORD_TYPES(CASE); } 60 switch(T::kType) { SK_RECORD_TYPES(CASE); }
61 #undef CASE 61 #undef CASE
62 SkDEBUGFAIL("Unknown T");
63 return "Unknown T";
62 } 64 }
63 65
64 static const char* NameOf(const SkRecords::SaveLayer&) { 66 static const char* NameOf(const SkRecords::SaveLayer&) {
65 return "\x1b[31;1mSaveLayer\x1b[0m"; // Bold red. 67 return "\x1b[31;1mSaveLayer\x1b[0m"; // Bold red.
66 } 68 }
67 69
68 int fIndent; 70 int fIndent;
69 }; 71 };
70 72
71 73
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 122 }
121 123
122 return 0; 124 return 0;
123 } 125 }
124 126
125 #if !defined SK_BUILD_FOR_IOS 127 #if !defined SK_BUILD_FOR_IOS
126 int main(int argc, char * const argv[]) { 128 int main(int argc, char * const argv[]) {
127 return tool_main(argc, (char**) argv); 129 return tool_main(argc, (char**) argv);
128 } 130 }
129 #endif 131 #endif
OLDNEW
« 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