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

Unified Diff: bench/BitmapBench.cpp

Issue 656913005: Revert of create shaderproc for nofilter-opaque-dx (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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 | src/core/SkBitmapProcState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/BitmapBench.cpp
diff --git a/bench/BitmapBench.cpp b/bench/BitmapBench.cpp
index da2e829a4d9dfe45b4cd5c4422aa026eacf26fde..efd6d9668429ee93cf8b378682d310e31ec6088f 100644
--- a/bench/BitmapBench.cpp
+++ b/bench/BitmapBench.cpp
@@ -75,7 +75,6 @@
const SkAlphaType fAlphaType;
const bool fForceUpdate; //bitmap marked as dirty before each draw. forces bitmap to be updated on device cache
const bool fIsVolatile;
- const bool fDoScale;
SkBitmap fBitmap;
SkPaint fPaint;
@@ -84,12 +83,11 @@
enum { W = 128 };
enum { H = 128 };
public:
- BitmapBench(SkColorType ct, SkAlphaType at, bool forceUpdate, bool isVolatile, bool doScale)
+ BitmapBench(SkColorType ct, SkAlphaType at, bool forceUpdate = false, bool isVolatile = false)
: fColorType(ct)
, fAlphaType(at)
, fForceUpdate(forceUpdate)
, fIsVolatile(isVolatile)
- , fDoScale(doScale)
{}
protected:
@@ -97,15 +95,10 @@
fName.set("bitmap");
fName.appendf("_%s%s", sk_tool_utils::colortype_name(fColorType),
kOpaque_SkAlphaType == fAlphaType ? "" : "_A");
- if (fDoScale) {
- fName.append("_scale");
- }
- if (fForceUpdate) {
+ if (fForceUpdate)
fName.append("_update");
- }
- if (fIsVolatile) {
+ if (fIsVolatile)
fName.append("_volatile");
- }
return fName.c_str();
}
@@ -132,9 +125,6 @@
}
virtual void onDraw(const int loops, SkCanvas* canvas) {
- if (fDoScale) {
- canvas->scale(.99f, .99f);
- }
SkIPoint dim = this->getSize();
SkRandom rand;
@@ -203,7 +193,7 @@
public:
FilterBitmapBench(SkColorType ct, SkAlphaType at,
bool forceUpdate, bool isVolitile, uint32_t flags)
- : INHERITED(ct, at, forceUpdate, isVolitile, false)
+ : INHERITED(ct, at, forceUpdate, isVolitile)
, fFlags(flags) {
}
@@ -282,7 +272,7 @@
public:
SourceAlphaBitmapBench(SourceAlpha alpha, SkColorType ct,
bool forceUpdate = false, bool bitmapVolatile = false)
- : INHERITED(ct, kPremul_SkAlphaType, forceUpdate, bitmapVolatile, false)
+ : INHERITED(ct, kPremul_SkAlphaType, forceUpdate, bitmapVolatile)
, fSourceAlpha(alpha) {
}
@@ -359,14 +349,13 @@
typedef BitmapBench INHERITED;
};
-DEF_BENCH( return new BitmapBench(kN32_SkColorType, kPremul_SkAlphaType, false, false, false); )
-DEF_BENCH( return new BitmapBench(kN32_SkColorType, kOpaque_SkAlphaType, false, false, false); )
-DEF_BENCH( return new BitmapBench(kN32_SkColorType, kOpaque_SkAlphaType, false, false, true); )
-DEF_BENCH( return new BitmapBench(kRGB_565_SkColorType, kOpaque_SkAlphaType, false, false, false); )
-DEF_BENCH( return new BitmapBench(kIndex_8_SkColorType, kPremul_SkAlphaType, false, false, false); )
-DEF_BENCH( return new BitmapBench(kIndex_8_SkColorType, kOpaque_SkAlphaType, false, false, false); )
-DEF_BENCH( return new BitmapBench(kN32_SkColorType, kOpaque_SkAlphaType, true, true, false); )
-DEF_BENCH( return new BitmapBench(kN32_SkColorType, kOpaque_SkAlphaType, true, false, false); )
+DEF_BENCH( return new BitmapBench(kN32_SkColorType, kPremul_SkAlphaType); )
+DEF_BENCH( return new BitmapBench(kN32_SkColorType, kOpaque_SkAlphaType); )
+DEF_BENCH( return new BitmapBench(kRGB_565_SkColorType, kOpaque_SkAlphaType); )
+DEF_BENCH( return new BitmapBench(kIndex_8_SkColorType, kPremul_SkAlphaType); )
+DEF_BENCH( return new BitmapBench(kIndex_8_SkColorType, kOpaque_SkAlphaType); )
+DEF_BENCH( return new BitmapBench(kN32_SkColorType, kOpaque_SkAlphaType, true, true); )
+DEF_BENCH( return new BitmapBench(kN32_SkColorType, kOpaque_SkAlphaType, true, false); )
// scale filter -> S32_opaque_D32_filter_DX_{SSE2,SSSE3} and Fact9 is also for S32_D16_filter_DX_SSE2
DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kPremul_SkAlphaType, false, false, kScale_Flag | kBilerp_Flag); )
« no previous file with comments | « no previous file | src/core/SkBitmapProcState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698