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

Side by Side Diff: bench/SkLinearBitmapPipelineBench.cpp

Issue 1967283002: All source types working for linear pipeline. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix benchmark. Created 4 years, 7 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 | « no previous file | gm/SkLinearBitmapPipelineGM.cpp » ('j') | gm/SkLinearBitmapPipelineGM.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
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 SkColor paintColor = SkColorSetARGB(255, 0 , 0, 0);
148 SkLinearBitmapPipeline pipeline{ 149 SkLinearBitmapPipeline pipeline{
149 fInvert, filterQuality, fXTile, fYTile, 1.0f, srcPixmap}; 150 fInvert, filterQuality, fXTile, fYTile, paintColor, srcPixmap};
f(malita) 2016/05/13 16:10:39 Nit: s/paintColor/SK_ColorBLACK/
herb_g 2016/05/13 16:42:23 Done.
150 151
151 int count = 100; 152 int count = 100;
152 153
153 for (int n = 0; n < 1000*loops; n++) { 154 for (int n = 0; n < 1000*loops; n++) {
154 pipeline.shadeSpan4f(3, 6, FPbuffer, count); 155 pipeline.shadeSpan4f(3, 6, FPbuffer, count);
155 } 156 }
156 } 157 }
157 }; 158 };
158 159
159 struct SkBitmapFPOrigShader : public CommonBitmapFPBenchmark { 160 struct SkBitmapFPOrigShader : public CommonBitmapFPBenchmark {
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 srcSize, kSRGB_SkColorProfileType, mR, true, 337 srcSize, kSRGB_SkColorProfileType, mR, true,
337 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);) 338 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);)
338 339
339 DEF_BENCH(return new SkBitmapFPGeneral( 340 DEF_BENCH(return new SkBitmapFPGeneral(
340 srcSize, kLinear_SkColorProfileType, mR, true, 341 srcSize, kLinear_SkColorProfileType, mR, true,
341 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);) 342 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);)
342 343
343 DEF_BENCH(return new SkBitmapFPOrigShader( 344 DEF_BENCH(return new SkBitmapFPOrigShader(
344 srcSize, kLinear_SkColorProfileType, mR, true, 345 srcSize, kLinear_SkColorProfileType, mR, true,
345 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);) 346 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);)
OLDNEW
« no previous file with comments | « no previous file | gm/SkLinearBitmapPipelineGM.cpp » ('j') | gm/SkLinearBitmapPipelineGM.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698