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

Side by Side Diff: bench/BitmapScaleBench.cpp

Issue 23478013: Major bench refactoring. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: merge with head agani Created 7 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 | Annotate | Revision Log
« no previous file with comments | « bench/BitmapRectBench.cpp ('k') | bench/BlurBench.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 "SkBenchmark.h" 8 #include "SkBenchmark.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 fMatrix.setScale( scale(), scale() ); 69 fMatrix.setScale( scale(), scale() );
70 } 70 }
71 71
72 virtual void onDraw(SkCanvas*) { 72 virtual void onDraw(SkCanvas*) {
73 SkPaint paint; 73 SkPaint paint;
74 this->setupPaint(&paint); 74 this->setupPaint(&paint);
75 75
76 preBenchSetup(); 76 preBenchSetup();
77 77
78 for (int i = 0; i < SkBENCHLOOP(fLoopCount); i++) { 78 for (int i = 0; i < this->getLoops(); i++) {
79 doScaleImage(); 79 doScaleImage();
80 } 80 }
81 } 81 }
82 82
83 virtual void doScaleImage() = 0; 83 virtual void doScaleImage() = 0;
84 virtual void preBenchSetup() {} 84 virtual void preBenchSetup() {}
85 private: 85 private:
86 typedef SkBenchmark INHERITED; 86 typedef SkBenchmark INHERITED;
87 }; 87 };
88 88
(...skipping 16 matching lines...) Expand all
105 105
106 DEF_BENCH(return new BitmapFilterScaleBench(p, 10, 90);) 106 DEF_BENCH(return new BitmapFilterScaleBench(p, 10, 90);)
107 DEF_BENCH(return new BitmapFilterScaleBench(p, 30, 90);) 107 DEF_BENCH(return new BitmapFilterScaleBench(p, 30, 90);)
108 DEF_BENCH(return new BitmapFilterScaleBench(p, 80, 90);) 108 DEF_BENCH(return new BitmapFilterScaleBench(p, 80, 90);)
109 DEF_BENCH(return new BitmapFilterScaleBench(p, 90, 90);) 109 DEF_BENCH(return new BitmapFilterScaleBench(p, 90, 90);)
110 DEF_BENCH(return new BitmapFilterScaleBench(p, 90, 80);) 110 DEF_BENCH(return new BitmapFilterScaleBench(p, 90, 80);)
111 DEF_BENCH(return new BitmapFilterScaleBench(p, 90, 30);) 111 DEF_BENCH(return new BitmapFilterScaleBench(p, 90, 30);)
112 DEF_BENCH(return new BitmapFilterScaleBench(p, 90, 10);) 112 DEF_BENCH(return new BitmapFilterScaleBench(p, 90, 10);)
113 DEF_BENCH(return new BitmapFilterScaleBench(p, 256, 64);) 113 DEF_BENCH(return new BitmapFilterScaleBench(p, 256, 64);)
114 DEF_BENCH(return new BitmapFilterScaleBench(p, 64, 256);) 114 DEF_BENCH(return new BitmapFilterScaleBench(p, 64, 256);)
OLDNEW
« no previous file with comments | « bench/BitmapRectBench.cpp ('k') | bench/BlurBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698