Index: bench/XferF16Bench.cpp |
diff --git a/bench/XferU64Bench.cpp b/bench/XferF16Bench.cpp |
similarity index 51% |
rename from bench/XferU64Bench.cpp |
rename to bench/XferF16Bench.cpp |
index 324655b351bcd0e6999e8e0c0f2281e633dcaf11..6a7d27a92672549925afa4480223cbbcf834aae1 100644 |
--- a/bench/XferU64Bench.cpp |
+++ b/bench/XferF16Bench.cpp |
@@ -15,22 +15,21 @@ |
#define INNER_LOOPS 1000 |
// Benchmark that draws non-AA rects or AA text with an SkXfermode::Mode. |
-class XferD64Bench : public Benchmark { |
+class XferF16Bench : public Benchmark { |
public: |
- XferD64Bench(SkXfermode::Mode mode, const char name[], bool doN, uint32_t flags) |
+ XferF16Bench(SkXfermode::Mode mode, const char name[], bool doN, uint32_t flags) |
: fDoN(doN) |
, fFlags(flags & ~USE_AA) |
{ |
fXfer = SkXfermode::Make(mode); |
- fProc1 = SkXfermode::GetD64Proc(fXfer, fFlags | SkXfermode::kSrcIsSingle_D64Flag); |
- fProcN = SkXfermode::GetD64Proc(fXfer, fFlags); |
- fName.printf("xferu64_%s_%s_%c_%s_%s", |
+ fProc1 = SkXfermode::GetF16Proc(fXfer, fFlags | SkXfermode::kSrcIsSingle_F16Flag); |
+ fProcN = SkXfermode::GetF16Proc(fXfer, fFlags); |
+ fName.printf("xferF16_%s_%s_%c_%s", |
name, |
(flags & USE_AA) ? "aa" : "bw", |
fDoN ? 'N' : '1', |
- (flags & SkXfermode::kSrcIsOpaque_D64Flag) ? "opaque" : "alpha", |
- (flags & SkXfermode::kDstIsFloat16_D64Flag) ? "f16" : "u16"); |
+ (flags & SkXfermode::kSrcIsOpaque_F16Flag) ? "opaque" : "alpha"); |
for (int i = 0; i < N; ++i) { |
fSrc[i] = {{ 1, 1, 1, 1 }}; |
@@ -63,8 +62,8 @@ protected: |
private: |
sk_sp<SkXfermode> fXfer; |
SkString fName; |
- SkXfermode::D64Proc fProc1; |
- SkXfermode::D64Proc fProcN; |
+ SkXfermode::F16Proc fProc1; |
+ SkXfermode::F16Proc fProcN; |
const SkAlpha* fAA; |
bool fDoN; |
uint32_t fFlags; |
@@ -80,29 +79,17 @@ private: |
}; |
#define F00 0 |
-#define F01 (SkXfermode::kSrcIsOpaque_D64Flag) |
-#define F10 (SkXfermode::kDstIsFloat16_D64Flag) |
-#define F11 (SkXfermode::kDstIsFloat16_D64Flag | SkXfermode::kSrcIsOpaque_D64Flag) |
+#define F01 (SkXfermode::kSrcIsOpaque_F16Flag) |
#define MODE SkXfermode::kSrcOver_Mode |
#define NAME "srcover" |
-DEF_BENCH( return new XferD64Bench(MODE, NAME, true, F10 | USE_AA); ) |
-DEF_BENCH( return new XferD64Bench(MODE, NAME, true, F11 | USE_AA); ) |
-DEF_BENCH( return new XferD64Bench(MODE, NAME, true, F10); ) |
-DEF_BENCH( return new XferD64Bench(MODE, NAME, true, F11); ) |
- |
-DEF_BENCH( return new XferD64Bench(MODE, NAME, true, F00 | USE_AA); ) |
-DEF_BENCH( return new XferD64Bench(MODE, NAME, true, F01 | USE_AA); ) |
-DEF_BENCH( return new XferD64Bench(MODE, NAME, true, F00); ) |
-DEF_BENCH( return new XferD64Bench(MODE, NAME, true, F01); ) |
- |
-DEF_BENCH( return new XferD64Bench(MODE, NAME, false, F10 | USE_AA); ) |
-DEF_BENCH( return new XferD64Bench(MODE, NAME, false, F11 | USE_AA); ) |
-DEF_BENCH( return new XferD64Bench(MODE, NAME, false, F10); ) |
-DEF_BENCH( return new XferD64Bench(MODE, NAME, false, F11); ) |
- |
-DEF_BENCH( return new XferD64Bench(MODE, NAME, false, F00 | USE_AA); ) |
-DEF_BENCH( return new XferD64Bench(MODE, NAME, false, F01 | USE_AA); ) |
-DEF_BENCH( return new XferD64Bench(MODE, NAME, false, F00); ) |
-DEF_BENCH( return new XferD64Bench(MODE, NAME, false, F01); ) |
+DEF_BENCH( return new XferF16Bench(MODE, NAME, true, F00 | USE_AA); ) |
+DEF_BENCH( return new XferF16Bench(MODE, NAME, true, F01 | USE_AA); ) |
+DEF_BENCH( return new XferF16Bench(MODE, NAME, true, F00); ) |
+DEF_BENCH( return new XferF16Bench(MODE, NAME, true, F01); ) |
+ |
+DEF_BENCH( return new XferF16Bench(MODE, NAME, false, F00 | USE_AA); ) |
+DEF_BENCH( return new XferF16Bench(MODE, NAME, false, F01 | USE_AA); ) |
+DEF_BENCH( return new XferF16Bench(MODE, NAME, false, F00); ) |
+DEF_BENCH( return new XferF16Bench(MODE, NAME, false, F01); ) |