OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |