OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "Benchmark.h" | 9 #include "Benchmark.h" |
10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 if (doScale) { | 73 if (doScale) { |
74 fName.append("_scale"); | 74 fName.append("_scale"); |
75 } | 75 } |
76 } | 76 } |
77 | 77 |
78 protected: | 78 protected: |
79 virtual const char* onGetName() { | 79 virtual const char* onGetName() { |
80 return fName.c_str(); | 80 return fName.c_str(); |
81 } | 81 } |
82 | 82 |
83 virtual void onDraw(const int loops, SkCanvas* canvas) { | 83 virtual void onDraw(int loops, SkCanvas* canvas) { |
84 SkPaint paint(fPaint); | 84 SkPaint paint(fPaint); |
85 this->setupPaint(&paint); | 85 this->setupPaint(&paint); |
86 paint.setFilterQuality(fDoFilter ? kLow_SkFilterQuality | 86 paint.setFilterQuality(fDoFilter ? kLow_SkFilterQuality |
87 : kNone_SkFilterQuality); | 87 : kNone_SkFilterQuality); |
88 if (fDoTrans) { | 88 if (fDoTrans) { |
89 paint.setColor(SkColorSetARGBMacro(0x80, 0xFF, 0xFF, 0xFF)); | 89 paint.setColor(SkColorSetARGBMacro(0x80, 0xFF, 0xFF, 0xFF)); |
90 } | 90 } |
91 | 91 |
92 SkRect r; | 92 SkRect r; |
93 | 93 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 //DEF_BENCH(return new ConstXTileBench(SkShader::kClamp_TileMode, SkShader::kCla
mp_TileMode, true, false, true)) | 125 //DEF_BENCH(return new ConstXTileBench(SkShader::kClamp_TileMode, SkShader::kCla
mp_TileMode, true, false, true)) |
126 DEF_BENCH(return new ConstXTileBench(SkShader::kMirror_TileMode, SkShader::kMirr
or_TileMode, true, false, false)) | 126 DEF_BENCH(return new ConstXTileBench(SkShader::kMirror_TileMode, SkShader::kMirr
or_TileMode, true, false, false)) |
127 | 127 |
128 //DEF_BENCH(return new ConstXTileBench(SkShader::kRepeat_TileMode, SkShader::kRe
peat_TileMode, false, true, true)) | 128 //DEF_BENCH(return new ConstXTileBench(SkShader::kRepeat_TileMode, SkShader::kRe
peat_TileMode, false, true, true)) |
129 DEF_BENCH(return new ConstXTileBench(SkShader::kClamp_TileMode, SkShader::kClamp
_TileMode, false, true, false)) | 129 DEF_BENCH(return new ConstXTileBench(SkShader::kClamp_TileMode, SkShader::kClamp
_TileMode, false, true, false)) |
130 //DEF_BENCH(return new ConstXTileBench(SkShader::kMirror_TileMode, SkShader::kMi
rror_TileMode, false, true, true)) | 130 //DEF_BENCH(return new ConstXTileBench(SkShader::kMirror_TileMode, SkShader::kMi
rror_TileMode, false, true, true)) |
131 | 131 |
132 DEF_BENCH(return new ConstXTileBench(SkShader::kRepeat_TileMode, SkShader::kRepe
at_TileMode, true, true, false)) | 132 DEF_BENCH(return new ConstXTileBench(SkShader::kRepeat_TileMode, SkShader::kRepe
at_TileMode, true, true, false)) |
133 //DEF_BENCH(return new ConstXTileBench(SkShader::kClamp_TileMode, SkShader::kCla
mp_TileMode, true, true, true)) | 133 //DEF_BENCH(return new ConstXTileBench(SkShader::kClamp_TileMode, SkShader::kCla
mp_TileMode, true, true, true)) |
134 DEF_BENCH(return new ConstXTileBench(SkShader::kMirror_TileMode, SkShader::kMirr
or_TileMode, true, true, false)) | 134 DEF_BENCH(return new ConstXTileBench(SkShader::kMirror_TileMode, SkShader::kMirr
or_TileMode, true, true, false)) |
OLD | NEW |