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

Side by Side Diff: bench/SKPBench.cpp

Issue 653023003: Try out SkTree in nanobench. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: SkRTree instead Created 6 years, 1 month 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 | « bench/RecordingBench.cpp ('k') | bench/nanobench.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 "SKPBench.h" 8 #include "SKPBench.h"
9 #include "SkCommandLineFlags.h" 9 #include "SkCommandLineFlags.h"
10 10
11 DECLARE_int32(benchTile); 11 DEFINE_int32(benchTile, 256, "Tile dimension used for SKP playback.");
12 12
13 SKPBench::SKPBench(const char* name, const SkPicture* pic, const SkIRect& clip, SkScalar scale) 13 SKPBench::SKPBench(const char* name, const SkPicture* pic, const SkIRect& clip, SkScalar scale)
14 : fPic(SkRef(pic)) 14 : fPic(SkRef(pic))
15 , fClip(clip) 15 , fClip(clip)
16 , fScale(scale) 16 , fScale(scale)
17 , fName(name) { 17 , fName(name) {
18 fUniqueName.printf("%s_%.2g", name, scale); // Scale makes this unqiue for skiaperf.com traces. 18 fUniqueName.printf("%s_%.2g", name, scale); // Scale makes this unqiue for skiaperf.com traces.
19 } 19 }
20 20
21 const char* SKPBench::onGetName() { 21 const char* SKPBench::onGetName() {
(...skipping 24 matching lines...) Expand all
46 for (int x = bounds.fLeft; x < bounds.fRight; x += FLAGS_benchTile) { 46 for (int x = bounds.fLeft; x < bounds.fRight; x += FLAGS_benchTile) {
47 SkAutoCanvasRestore perTile(canvas, true/*save now*/); 47 SkAutoCanvasRestore perTile(canvas, true/*save now*/);
48 canvas->clipRect(SkRect::Make( 48 canvas->clipRect(SkRect::Make(
49 SkIRect::MakeXYWH(x, y, FLAGS_benchTile, FLAGS_bench Tile))); 49 SkIRect::MakeXYWH(x, y, FLAGS_benchTile, FLAGS_bench Tile)));
50 fPic->playback(canvas); 50 fPic->playback(canvas);
51 } 51 }
52 } 52 }
53 canvas->flush(); 53 canvas->flush();
54 } 54 }
55 } 55 }
OLDNEW
« no previous file with comments | « bench/RecordingBench.cpp ('k') | bench/nanobench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698