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

Side by Side Diff: tools/render_pictures_main.cpp

Issue 238273012: Staged removal of SkPicture-derived classes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: have SkPicture only friend SkPictureRecorder once Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « tools/filtermain.cpp ('k') | tools/skpmaker.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 "CopyTilesRenderer.h" 9 #include "CopyTilesRenderer.h"
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 SkDebugf("deserializing... %s\n", inputPath.c_str()); 166 SkDebugf("deserializing... %s\n", inputPath.c_str());
167 167
168 SkPicture* picture = SkPicture::CreateFromStream(&inputStream, proc); 168 SkPicture* picture = SkPicture::CreateFromStream(&inputStream, proc);
169 169
170 if (NULL == picture) { 170 if (NULL == picture) {
171 SkDebugf("Could not read an SkPicture from %s\n", inputPath.c_str()); 171 SkDebugf("Could not read an SkPicture from %s\n", inputPath.c_str());
172 return false; 172 return false;
173 } 173 }
174 174
175 while (FLAGS_bench_record) { 175 while (FLAGS_bench_record) {
176 const int kRecordFlags = 0;
177 SkPictureRecorder recorder; 176 SkPictureRecorder recorder;
178 picture->draw(recorder.beginRecording(picture->width(), picture->height( ), kRecordFlags)); 177 picture->draw(recorder.beginRecording(picture->width(), picture->height( ), NULL, 0));
179 SkAutoTUnref<SkPicture> other(recorder.endRecording()); 178 SkAutoTUnref<SkPicture> other(recorder.endRecording());
180 } 179 }
181 180
182 for (int i = 0; i < FLAGS_clone; ++i) { 181 for (int i = 0; i < FLAGS_clone; ++i) {
183 SkPicture* clone = picture->clone(); 182 SkPicture* clone = picture->clone();
184 SkDELETE(picture); 183 SkDELETE(picture);
185 picture = clone; 184 picture = clone;
186 } 185 }
187 186
188 SkDebugf("drawing... [%i %i] %s\n", picture->width(), picture->height(), 187 SkDebugf("drawing... [%i %i] %s\n", picture->width(), picture->height(),
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]); 479 jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]);
481 } 480 }
482 return 0; 481 return 0;
483 } 482 }
484 483
485 #if !defined SK_BUILD_FOR_IOS 484 #if !defined SK_BUILD_FOR_IOS
486 int main(int argc, char * const argv[]) { 485 int main(int argc, char * const argv[]) {
487 return tool_main(argc, (char**) argv); 486 return tool_main(argc, (char**) argv);
488 } 487 }
489 #endif 488 #endif
OLDNEW
« no previous file with comments | « tools/filtermain.cpp ('k') | tools/skpmaker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698