OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "SkBitmap.h" | 8 #include "SkBitmap.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkGraphics.h" | 10 #include "SkGraphics.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 SkDebugf("Could not create SkPicture: %s\n", path); | 38 SkDebugf("Could not create SkPicture: %s\n", path); |
39 return nullptr; | 39 return nullptr; |
40 } | 40 } |
41 printf("picture cullRect: [%f %f %f %f]\n", | 41 printf("picture cullRect: [%f %f %f %f]\n", |
42 pic->cullRect().fLeft, pic->cullRect().fTop, | 42 pic->cullRect().fLeft, pic->cullRect().fTop, |
43 pic->cullRect().fRight, pic->cullRect().fBottom); | 43 pic->cullRect().fRight, pic->cullRect().fBottom); |
44 return pic; | 44 return pic; |
45 } | 45 } |
46 | 46 |
47 static void dumpOps(SkPicture* pic) { | 47 static void dumpOps(SkPicture* pic) { |
48 #ifdef SK_DEVELOPER | 48 #ifdef SK_DEBUG |
49 SkDebugfDumper dumper; | 49 SkDebugfDumper dumper; |
50 SkDumpCanvas canvas(&dumper); | 50 SkDumpCanvas canvas(&dumper); |
51 canvas.drawPicture(pic); | 51 canvas.drawPicture(pic); |
52 #else | 52 #else |
53 printf("SK_DEVELOPER mode not enabled\n"); | 53 printf("SK_DEBUG mode not enabled\n"); |
54 #endif | 54 #endif |
55 } | 55 } |
56 | 56 |
57 int tool_main(int argc, char** argv); | 57 int tool_main(int argc, char** argv); |
58 int tool_main(int argc, char** argv) { | 58 int tool_main(int argc, char** argv) { |
59 SkAutoGraphics ag; | 59 SkAutoGraphics ag; |
60 if (argc < 2) { | 60 if (argc < 2) { |
61 printf("Usage: pinspect [--dump-ops] filename [filename ...]\n"); | 61 printf("Usage: pinspect [--dump-ops] filename [filename ...]\n"); |
62 return 1; | 62 return 1; |
63 } | 63 } |
(...skipping 16 matching lines...) Expand all Loading... |
80 } | 80 } |
81 } | 81 } |
82 return 0; | 82 return 0; |
83 } | 83 } |
84 | 84 |
85 #if !defined SK_BUILD_FOR_IOS | 85 #if !defined SK_BUILD_FOR_IOS |
86 int main(int argc, char * const argv[]) { | 86 int main(int argc, char * const argv[]) { |
87 return tool_main(argc, (char**) argv); | 87 return tool_main(argc, (char**) argv); |
88 } | 88 } |
89 #endif | 89 #endif |
OLD | NEW |