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

Side by Side Diff: bench/BitmapScaleBench.cpp

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 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 | « bench/BitmapRectBench.cpp ('k') | bench/BlurImageFilterBench.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 "Benchmark.h" 8 #include "Benchmark.h"
9 #include "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 private: 81 private:
82 typedef Benchmark INHERITED; 82 typedef Benchmark INHERITED;
83 }; 83 };
84 84
85 class BitmapFilterScaleBench: public BitmapScaleBench { 85 class BitmapFilterScaleBench: public BitmapScaleBench {
86 public: 86 public:
87 BitmapFilterScaleBench( int is, int os) : INHERITED(is, os) { 87 BitmapFilterScaleBench( int is, int os) : INHERITED(is, os) {
88 setName( "filter" ); 88 setName( "filter" );
89 } 89 }
90 protected: 90 protected:
91 virtual void doScaleImage() SK_OVERRIDE { 91 void doScaleImage() SK_OVERRIDE {
92 SkCanvas canvas( fOutputBitmap ); 92 SkCanvas canvas( fOutputBitmap );
93 SkPaint paint; 93 SkPaint paint;
94 94
95 paint.setFilterLevel(SkPaint::kHigh_FilterLevel); 95 paint.setFilterLevel(SkPaint::kHigh_FilterLevel);
96 fInputBitmap.notifyPixelsChanged(); 96 fInputBitmap.notifyPixelsChanged();
97 canvas.concat(fMatrix); 97 canvas.concat(fMatrix);
98 canvas.drawBitmap(fInputBitmap, 0, 0, &paint ); 98 canvas.drawBitmap(fInputBitmap, 0, 0, &paint );
99 } 99 }
100 private: 100 private:
101 typedef BitmapScaleBench INHERITED; 101 typedef BitmapScaleBench INHERITED;
102 }; 102 };
103 103
104 DEF_BENCH(return new BitmapFilterScaleBench(10, 90);) 104 DEF_BENCH(return new BitmapFilterScaleBench(10, 90);)
105 DEF_BENCH(return new BitmapFilterScaleBench(30, 90);) 105 DEF_BENCH(return new BitmapFilterScaleBench(30, 90);)
106 DEF_BENCH(return new BitmapFilterScaleBench(80, 90);) 106 DEF_BENCH(return new BitmapFilterScaleBench(80, 90);)
107 DEF_BENCH(return new BitmapFilterScaleBench(90, 90);) 107 DEF_BENCH(return new BitmapFilterScaleBench(90, 90);)
108 DEF_BENCH(return new BitmapFilterScaleBench(90, 80);) 108 DEF_BENCH(return new BitmapFilterScaleBench(90, 80);)
109 DEF_BENCH(return new BitmapFilterScaleBench(90, 30);) 109 DEF_BENCH(return new BitmapFilterScaleBench(90, 30);)
110 DEF_BENCH(return new BitmapFilterScaleBench(90, 10);) 110 DEF_BENCH(return new BitmapFilterScaleBench(90, 10);)
111 DEF_BENCH(return new BitmapFilterScaleBench(256, 64);) 111 DEF_BENCH(return new BitmapFilterScaleBench(256, 64);)
112 DEF_BENCH(return new BitmapFilterScaleBench(64, 256);) 112 DEF_BENCH(return new BitmapFilterScaleBench(64, 256);)
OLDNEW
« no previous file with comments | « bench/BitmapRectBench.cpp ('k') | bench/BlurImageFilterBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698