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

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: use black const 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') | 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 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
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
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);)
OLDNEW
« no previous file with comments | « no previous file | gm/SkLinearBitmapPipelineGM.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698