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

Side by Side Diff: tools/render_pictures_main.cpp

Issue 540963002: Change SkPicture::draw to playback (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
« include/core/SkPicture.h ('K') | « tools/gpuveto.cpp ('k') | no next file » | 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 if (NULL == picture) { 178 if (NULL == picture) {
179 SkDebugf("Could not read an SkPicture from %s\n", inputPath.c_str()); 179 SkDebugf("Could not read an SkPicture from %s\n", inputPath.c_str());
180 return false; 180 return false;
181 } 181 }
182 182
183 if (FLAGS_preprocess) { 183 if (FLAGS_preprocess) {
184 // Because the GPU preprocessing step relies on the in-memory picture 184 // Because the GPU preprocessing step relies on the in-memory picture
185 // statistics we need to rerecord the picture here 185 // statistics we need to rerecord the picture here
186 SkPictureRecorder recorder; 186 SkPictureRecorder recorder;
187 picture->draw(recorder.beginRecording(picture->cullRect().width(), 187 picture->playback(recorder.beginRecording(picture->cullRect().width(),
188 picture->cullRect().height(), 188 picture->cullRect().height(),
189 NULL, 0)); 189 NULL, 0));
190 picture.reset(recorder.endRecording()); 190 picture.reset(recorder.endRecording());
191 } 191 }
192 192
193 while (FLAGS_bench_record) { 193 while (FLAGS_bench_record) {
194 SkPictureRecorder recorder; 194 SkPictureRecorder recorder;
195 picture->draw(recorder.beginRecording(picture->cullRect().width(), 195 picture->playback(recorder.beginRecording(picture->cullRect().width(),
196 picture->cullRect().height(), 196 picture->cullRect().height(),
197 NULL, 0)); 197 NULL, 0));
198 SkAutoTUnref<SkPicture> other(recorder.endRecording()); 198 SkAutoTUnref<SkPicture> other(recorder.endRecording());
199 } 199 }
200 200
201 SkDebugf("drawing... [%f %f %f %f] %s\n", 201 SkDebugf("drawing... [%f %f %f %f] %s\n",
202 picture->cullRect().fLeft, picture->cullRect().fTop, 202 picture->cullRect().fLeft, picture->cullRect().fTop,
203 picture->cullRect().fRight, picture->cullRect().fBottom, 203 picture->cullRect().fRight, picture->cullRect().fBottom,
204 inputPath.c_str()); 204 inputPath.c_str());
205 205
206 renderer.init(picture, &writePathString, &mismatchPathString, &inputFilename , 206 renderer.init(picture, &writePathString, &mismatchPathString, &inputFilename ,
207 FLAGS_writeChecksumBasedFilenames); 207 FLAGS_writeChecksumBasedFilenames);
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]); 511 jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]);
512 } 512 }
513 return 0; 513 return 0;
514 } 514 }
515 515
516 #if !defined SK_BUILD_FOR_IOS 516 #if !defined SK_BUILD_FOR_IOS
517 int main(int argc, char * const argv[]) { 517 int main(int argc, char * const argv[]) {
518 return tool_main(argc, (char**) argv); 518 return tool_main(argc, (char**) argv);
519 } 519 }
520 #endif 520 #endif
OLDNEW
« include/core/SkPicture.h ('K') | « tools/gpuveto.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698