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

Side by Side Diff: tools/pinspect.cpp

Issue 513983002: Try out scalar picture sizes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT again Created 6 years, 3 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 | « tools/lua/lua_pictures.cpp ('k') | tools/render_pdfs_main.cpp » ('j') | 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 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 "LazyDecodeBitmap.h" 8 #include "LazyDecodeBitmap.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 printf("version:%d width:%d height:%d\n", header[0], header[1], header[2 ]); 34 printf("version:%d width:%d height:%d\n", header[0], header[1], header[2 ]);
35 } 35 }
36 36
37 stream.rewind(); 37 stream.rewind();
38 SkPicture* pic = SkPicture::CreateFromStream(&stream, &sk_tools::LazyDecodeB itmap); 38 SkPicture* pic = SkPicture::CreateFromStream(&stream, &sk_tools::LazyDecodeB itmap);
39 if (NULL == pic) { 39 if (NULL == pic) {
40 SkDebugf("Could not create SkPicture: %s\n", path); 40 SkDebugf("Could not create SkPicture: %s\n", path);
41 return NULL; 41 return NULL;
42 } 42 }
43 printf("picture size:[%d %d]\n", pic->width(), pic->height()); 43 printf("picture cullRect: [%f %f %f %f]\n",
44 pic->cullRect().fLeft, pic->cullRect().fTop,
45 pic->cullRect().fRight, pic->cullRect().fBottom);
44 return pic; 46 return pic;
45 } 47 }
46 48
47 static void dumpOps(SkPicture* pic) { 49 static void dumpOps(SkPicture* pic) {
48 #ifdef SK_DEVELOPER 50 #ifdef SK_DEVELOPER
49 SkDebugfDumper dumper; 51 SkDebugfDumper dumper;
50 SkDumpCanvas canvas(&dumper); 52 SkDumpCanvas canvas(&dumper);
51 canvas.drawPicture(pic); 53 canvas.drawPicture(pic);
52 #else 54 #else
53 printf("SK_DEVELOPER mode not enabled\n"); 55 printf("SK_DEVELOPER mode not enabled\n");
(...skipping 26 matching lines...) Expand all
80 } 82 }
81 } 83 }
82 return 0; 84 return 0;
83 } 85 }
84 86
85 #if !defined SK_BUILD_FOR_IOS 87 #if !defined SK_BUILD_FOR_IOS
86 int main(int argc, char * const argv[]) { 88 int main(int argc, char * const argv[]) {
87 return tool_main(argc, (char**) argv); 89 return tool_main(argc, (char**) argv);
88 } 90 }
89 #endif 91 #endif
OLDNEW
« no previous file with comments | « tools/lua/lua_pictures.cpp ('k') | tools/render_pdfs_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698