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

Unified Diff: bench/SkLinearBitmapPipelineBench.cpp

Issue 1775963002: Bilerp + mirror + perspective (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gm/SkLinearBitmapPipelineGM.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/SkLinearBitmapPipelineBench.cpp
diff --git a/bench/SkLinearBitmapPipelineBench.cpp b/bench/SkLinearBitmapPipelineBench.cpp
index 7d2d4a54ddf4ef8c6e1ee2cc6e568f3ae8354d01..7ab29f699e13260c246b686965b475c757716527 100644
--- a/bench/SkLinearBitmapPipelineBench.cpp
+++ b/bench/SkLinearBitmapPipelineBench.cpp
@@ -145,7 +145,7 @@ struct SkBitmapFPGeneral final : public CommonBitmapFPBenchmark {
SkPixmap srcPixmap{fInfo, fBitmap.get(), static_cast<size_t>(4 * width)};
SkLinearBitmapPipeline pipeline{
- fInvert, filterQuality, fXTile, fYTile, srcPixmap};
+ fInvert, filterQuality, fXTile, fYTile, 1.0f, srcPixmap};
int count = 100;
@@ -262,6 +262,31 @@ DEF_BENCH(return new SkBitmapFPOrigShader(
srcSize, kLinear_SkColorProfileType, mS, true,
SkShader::kClamp_TileMode, SkShader::kClamp_TileMode);)
+// Repeat
+DEF_BENCH(return new SkBitmapFPGeneral(
+ srcSize, kSRGB_SkColorProfileType, mS, false,
+ SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);)
+
+DEF_BENCH(return new SkBitmapFPGeneral(
+ srcSize, kLinear_SkColorProfileType, mS, false,
+ SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);)
+
+DEF_BENCH(return new SkBitmapFPOrigShader(
+ srcSize, kLinear_SkColorProfileType, mS, false,
+ SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);)
+
+DEF_BENCH(return new SkBitmapFPGeneral(
+ srcSize, kSRGB_SkColorProfileType, mS, true,
+ SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);)
+
+DEF_BENCH(return new SkBitmapFPGeneral(
+ srcSize, kLinear_SkColorProfileType, mS, true,
+ SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);)
+
+DEF_BENCH(return new SkBitmapFPOrigShader(
+ srcSize, kLinear_SkColorProfileType, mS, true,
+ SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);)
+
static SkMatrix rotate(SkScalar r) {
SkMatrix m;
m.setRotate(30);
@@ -293,3 +318,29 @@ DEF_BENCH(return new SkBitmapFPOrigShader(
srcSize, kLinear_SkColorProfileType, mR, true,
SkShader::kClamp_TileMode, SkShader::kClamp_TileMode);)
+// Repeat
+DEF_BENCH(return new SkBitmapFPGeneral(
+ srcSize, kSRGB_SkColorProfileType, mR, false,
+ SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);)
+
+DEF_BENCH(return new SkBitmapFPGeneral(
+ srcSize, kLinear_SkColorProfileType, mR, false,
+ SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);)
+
+DEF_BENCH(return new SkBitmapFPOrigShader(
+ srcSize, kLinear_SkColorProfileType, mR, false,
+ SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);)
+
+DEF_BENCH(return new SkBitmapFPGeneral(
+ srcSize, kSRGB_SkColorProfileType, mR, true,
+ SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);)
+
+DEF_BENCH(return new SkBitmapFPGeneral(
+ srcSize, kLinear_SkColorProfileType, mR, true,
+ SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);)
+
+DEF_BENCH(return new SkBitmapFPOrigShader(
+ srcSize, kLinear_SkColorProfileType, mR, true,
+ SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);)
+
+
« 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