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

Side by Side Diff: tools/bbh_shootout.cpp

Issue 202983003: add --writeChecksumBasedFilenames flag to render_pictures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: pass SkString pointers to init Created 6 years, 9 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/PictureRenderer.cpp ('k') | tools/render_pictures_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 2013 Google Inc. 2 * Copyright 2013 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 "BenchTimer.h" 8 #include "BenchTimer.h"
9 #include "LazyDecodeBitmap.h" 9 #include "LazyDecodeBitmap.h"
10 #include "PictureBenchmark.h" 10 #include "PictureBenchmark.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 * @param numRepeats The number of times to repeat the draw. 60 * @param numRepeats The number of times to repeat the draw.
61 * @param timer The timer used to benchmark the work. 61 * @param timer The timer used to benchmark the work.
62 */ 62 */
63 static void do_benchmark_work(sk_tools::PictureRenderer* renderer, 63 static void do_benchmark_work(sk_tools::PictureRenderer* renderer,
64 BBoxType bBoxType, 64 BBoxType bBoxType,
65 SkPicture* pic, 65 SkPicture* pic,
66 const int numRepeats, 66 const int numRepeats,
67 BenchTimer* timer) { 67 BenchTimer* timer) {
68 renderer->setBBoxHierarchyType(bBoxType); 68 renderer->setBBoxHierarchyType(bBoxType);
69 renderer->setGridSize(FLAGS_tilesize, FLAGS_tilesize); 69 renderer->setGridSize(FLAGS_tilesize, FLAGS_tilesize);
70 renderer->init(pic); 70 renderer->init(pic, NULL, NULL, false);
71 71
72 SkDebugf("%s %d times...\n", renderer->getConfigName().c_str(), numRepeats); 72 SkDebugf("%s %d times...\n", renderer->getConfigName().c_str(), numRepeats);
73 for (int i = 0; i < numRepeats; ++i) { 73 for (int i = 0; i < numRepeats; ++i) {
74 renderer->setup(); 74 renderer->setup();
75 // Render once to fill caches 75 // Render once to fill caches
76 renderer->render(NULL, NULL); 76 renderer->render();
77 // Render again to measure 77 // Render again to measure
78 timer->start(); 78 timer->start();
79 renderer->render(NULL); 79 renderer->render();
80 timer->end(); 80 timer->end();
81 } 81 }
82 } 82 }
83 83
84 int tool_main(int argc, char** argv); 84 int tool_main(int argc, char** argv);
85 int tool_main(int argc, char** argv) { 85 int tool_main(int argc, char** argv) {
86 SkCommandLineFlags::Parse(argc, argv); 86 SkCommandLineFlags::Parse(argc, argv);
87 SkAutoGraphics ag; 87 SkAutoGraphics ag;
88 bool includeBBoxType[kBBoxTypeCount]; 88 bool includeBBoxType[kBBoxTypeCount];
89 for (int bBoxType = 0; bBoxType < kBBoxTypeCount; ++bBoxType) { 89 for (int bBoxType = 0; bBoxType < kBBoxTypeCount; ++bBoxType) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } 185 }
186 SkDebugf("\nWrote data to gnuplot-readable files: %s %s\n", pbTitle, recTitl e); 186 SkDebugf("\nWrote data to gnuplot-readable files: %s %s\n", pbTitle, recTitl e);
187 return 0; 187 return 0;
188 } 188 }
189 189
190 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 190 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
191 int main(int argc, char** argv) { 191 int main(int argc, char** argv) {
192 return tool_main(argc, argv); 192 return tool_main(argc, argv);
193 } 193 }
194 #endif 194 #endif
OLDNEW
« no previous file with comments | « tools/PictureRenderer.cpp ('k') | tools/render_pictures_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698