OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 <memory> | 8 #include <memory> |
9 #include "SkColor.h" | 9 #include "SkColor.h" |
10 #include "SkLinearBitmapPipeline.h" | 10 #include "SkLinearBitmapPipeline.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 SkFilterQuality filterQuality; | 139 SkFilterQuality filterQuality; |
140 if (fUseBilerp) { | 140 if (fUseBilerp) { |
141 filterQuality = SkFilterQuality::kLow_SkFilterQuality; | 141 filterQuality = SkFilterQuality::kLow_SkFilterQuality; |
142 } else { | 142 } else { |
143 filterQuality = SkFilterQuality::kNone_SkFilterQuality; | 143 filterQuality = SkFilterQuality::kNone_SkFilterQuality; |
144 } | 144 } |
145 | 145 |
146 SkPixmap srcPixmap{fInfo, fBitmap.get(), static_cast<size_t>(4 * width)}
; | 146 SkPixmap srcPixmap{fInfo, fBitmap.get(), static_cast<size_t>(4 * width)}
; |
147 | 147 |
148 SkLinearBitmapPipeline pipeline{ | 148 SkLinearBitmapPipeline pipeline{ |
149 fInvert, filterQuality, fXTile, fYTile, 1.0f, srcPixmap}; | 149 fInvert, filterQuality, fXTile, fYTile, SK_ColorBLACK, srcPixmap}; |
150 | 150 |
151 int count = 100; | 151 int count = 100; |
152 | 152 |
153 for (int n = 0; n < 1000*loops; n++) { | 153 for (int n = 0; n < 1000*loops; n++) { |
154 pipeline.shadeSpan4f(3, 6, FPbuffer, count); | 154 pipeline.shadeSpan4f(3, 6, FPbuffer, count); |
155 } | 155 } |
156 } | 156 } |
157 }; | 157 }; |
158 | 158 |
159 struct SkBitmapFPOrigShader : public CommonBitmapFPBenchmark { | 159 struct SkBitmapFPOrigShader : public CommonBitmapFPBenchmark { |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 srcSize, kSRGB_SkColorProfileType, mR, true, | 336 srcSize, kSRGB_SkColorProfileType, mR, true, |
337 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);) | 337 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);) |
338 | 338 |
339 DEF_BENCH(return new SkBitmapFPGeneral( | 339 DEF_BENCH(return new SkBitmapFPGeneral( |
340 srcSize, kLinear_SkColorProfileType, mR, true, | 340 srcSize, kLinear_SkColorProfileType, mR, true, |
341 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);) | 341 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);) |
342 | 342 |
343 DEF_BENCH(return new SkBitmapFPOrigShader( | 343 DEF_BENCH(return new SkBitmapFPOrigShader( |
344 srcSize, kLinear_SkColorProfileType, mR, true, | 344 srcSize, kLinear_SkColorProfileType, mR, true, |
345 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);) | 345 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);) |
OLD | NEW |