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

Side by Side Diff: tools/gpuveto.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/filtermain.cpp ('k') | tools/lua/lua_pictures.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 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 "LazyDecodeBitmap.h" 8 #include "LazyDecodeBitmap.h"
9 #include "SkCommandLineFlags.h" 9 #include "SkCommandLineFlags.h"
10 #include "SkPicture.h" 10 #include "SkPicture.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 if (NULL == picture.get()) { 48 if (NULL == picture.get()) {
49 if (!FLAGS_quiet) { 49 if (!FLAGS_quiet) {
50 SkDebugf("Could not read the SkPicture\n"); 50 SkDebugf("Could not read the SkPicture\n");
51 } 51 }
52 return kError; 52 return kError;
53 } 53 }
54 54
55 // The SkPicture tracking information is only generated during recording 55 // The SkPicture tracking information is only generated during recording
56 // an isn't serialized. Replay the picture to regenerated the tracking data. 56 // an isn't serialized. Replay the picture to regenerated the tracking data.
57 SkPictureRecorder recorder; 57 SkPictureRecorder recorder;
58 picture->draw(recorder.beginRecording(picture->width(), picture->height(), N ULL, 0)); 58 picture->draw(recorder.beginRecording(picture->cullRect().width(),
59 picture->cullRect().height(),
60 NULL, 0));
59 SkAutoTUnref<SkPicture> recorded(recorder.endRecording()); 61 SkAutoTUnref<SkPicture> recorded(recorder.endRecording());
60 62
61 if (recorded->suitableForGpuRasterization(NULL)) { 63 if (recorded->suitableForGpuRasterization(NULL)) {
62 SkDebugf("suitable\n"); 64 SkDebugf("suitable\n");
63 } else { 65 } else {
64 SkDebugf("unsuitable\n"); 66 SkDebugf("unsuitable\n");
65 } 67 }
66 68
67 return kSuccess; 69 return kSuccess;
68 #else 70 #else
69 SkDebugf("gpuveto is only useful when GPU rendering is enabled\n"); 71 SkDebugf("gpuveto is only useful when GPU rendering is enabled\n");
70 return kError; 72 return kError;
71 #endif 73 #endif
72 } 74 }
73 75
74 #if !defined SK_BUILD_FOR_IOS 76 #if !defined SK_BUILD_FOR_IOS
75 int main(int argc, char * const argv[]) { 77 int main(int argc, char * const argv[]) {
76 return tool_main(argc, (char**) argv); 78 return tool_main(argc, (char**) argv);
77 } 79 }
78 #endif 80 #endif
OLDNEW
« no previous file with comments | « tools/filtermain.cpp ('k') | tools/lua/lua_pictures.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698