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

Unified Diff: bench/BitmapRectBench.cpp

Issue 1009183002: swith over from SkPaint::FilterLevel to SkFilterQuality (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 | « bench/BitmapBench.cpp ('k') | bench/BitmapScaleBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/BitmapRectBench.cpp
diff --git a/bench/BitmapRectBench.cpp b/bench/BitmapRectBench.cpp
index fb3ebdaf15071cf6c1c124cec5ed8907ab0cec39..e2c2e345fc5b9343747b75917bb4858233e11a55 100644
--- a/bench/BitmapRectBench.cpp
+++ b/bench/BitmapRectBench.cpp
@@ -42,17 +42,17 @@ class BitmapRectBench : public Benchmark {
SkBitmap fBitmap;
bool fSlightMatrix;
uint8_t fAlpha;
- SkPaint::FilterLevel fFilterLevel;
+ SkFilterQuality fFilterQuality;
SkString fName;
SkRect fSrcR, fDstR;
static const int kWidth = 128;
static const int kHeight = 128;
public:
- BitmapRectBench(U8CPU alpha, SkPaint::FilterLevel filterLevel,
+ BitmapRectBench(U8CPU alpha, SkFilterQuality filterQuality,
bool slightMatrix) {
fAlpha = SkToU8(alpha);
- fFilterLevel = filterLevel;
+ fFilterQuality = filterQuality;
fSlightMatrix = slightMatrix;
fBitmap.setInfo(SkImageInfo::MakeN32Premul(kWidth, kHeight));
@@ -62,7 +62,7 @@ protected:
const char* onGetName() SK_OVERRIDE {
fName.printf("bitmaprect_%02X_%sfilter_%s",
fAlpha,
- SkPaint::kNone_FilterLevel == fFilterLevel ? "no" : "",
+ kNone_SkFilterQuality == fFilterQuality ? "no" : "",
fSlightMatrix ? "trans" : "identity");
return fName.c_str();
}
@@ -92,7 +92,7 @@ protected:
SkPaint paint;
this->setupPaint(&paint);
- paint.setFilterLevel(fFilterLevel);
+ paint.setFilterQuality(fFilterQuality);
paint.setAlpha(fAlpha);
for (int i = 0; i < loops; i++) {
@@ -104,10 +104,10 @@ private:
typedef Benchmark INHERITED;
};
-DEF_BENCH(return new BitmapRectBench(0xFF, SkPaint::kNone_FilterLevel, false))
-DEF_BENCH(return new BitmapRectBench(0x80, SkPaint::kNone_FilterLevel, false))
-DEF_BENCH(return new BitmapRectBench(0xFF, SkPaint::kLow_FilterLevel, false))
-DEF_BENCH(return new BitmapRectBench(0x80, SkPaint::kLow_FilterLevel, false))
+DEF_BENCH(return new BitmapRectBench(0xFF, kNone_SkFilterQuality, false))
+DEF_BENCH(return new BitmapRectBench(0x80, kNone_SkFilterQuality, false))
+DEF_BENCH(return new BitmapRectBench(0xFF, kLow_SkFilterQuality, false))
+DEF_BENCH(return new BitmapRectBench(0x80, kLow_SkFilterQuality, false))
-DEF_BENCH(return new BitmapRectBench(0xFF, SkPaint::kNone_FilterLevel, true))
-DEF_BENCH(return new BitmapRectBench(0xFF, SkPaint::kLow_FilterLevel, true))
+DEF_BENCH(return new BitmapRectBench(0xFF, kNone_SkFilterQuality, true))
+DEF_BENCH(return new BitmapRectBench(0xFF, kLow_SkFilterQuality, true))
« no previous file with comments | « bench/BitmapBench.cpp ('k') | bench/BitmapScaleBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698