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

Unified Diff: gm/tilemodes_scaled.cpp

Issue 1014533004: SkPaint::FilterLevel -> 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 | « gm/tilemodes.cpp ('k') | include/core/SkPaint.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/tilemodes_scaled.cpp
diff --git a/gm/tilemodes_scaled.cpp b/gm/tilemodes_scaled.cpp
index 508e57678a3486e0b8bd1b9ef5e8147db920e35e..a8227a005b3c4716456602e27a20f8661a536a82 100644
--- a/gm/tilemodes_scaled.cpp
+++ b/gm/tilemodes_scaled.cpp
@@ -35,11 +35,11 @@ static void makebm(SkBitmap* bm, SkColorType ct, int w, int h) {
canvas.drawPaint(paint);
}
-static void setup(SkPaint* paint, const SkBitmap& bm, SkPaint::FilterLevel filter_level,
+static void setup(SkPaint* paint, const SkBitmap& bm, SkFilterQuality filter_level,
SkShader::TileMode tmx, SkShader::TileMode tmy) {
SkShader* shader = SkShader::CreateBitmapShader(bm, tmx, tmy);
paint->setShader(shader)->unref();
- paint->setFilterLevel(filter_level);
+ paint->setFilterQuality(filter_level);
}
static const SkColorType gColorTypes[] = {
@@ -91,12 +91,12 @@ protected:
static const char* gColorTypeNames[] = { "8888" , "565", "4444" };
- static const SkPaint::FilterLevel gFilterLevels[] =
- { SkPaint::kNone_FilterLevel,
- SkPaint::kLow_FilterLevel,
- SkPaint::kMedium_FilterLevel,
- SkPaint::kHigh_FilterLevel };
- static const char* gFilterNames[] = { "None", "Low", "Medium", "High" };
+ static const SkFilterQuality gFilterQualitys[] =
+ { kNone_SkFilterQuality,
+ kLow_SkFilterQuality,
+ kMedium_SkFilterQuality,
+ kHigh_SkFilterQuality };
+ static const char* gFilterNames[] = { "None", "Low", "Medium", "High" };
static const SkShader::TileMode gModes[] = { SkShader::kClamp_TileMode, SkShader::kRepeat_TileMode, SkShader::kMirror_TileMode };
static const char* gModeNames[] = { "C", "R", "M" };
@@ -124,7 +124,7 @@ protected:
y = SkIntToScalar(40) / scale;
for (size_t i = 0; i < SK_ARRAY_COUNT(gColorTypes); i++) {
- for (size_t j = 0; j < SK_ARRAY_COUNT(gFilterLevels); j++) {
+ for (size_t j = 0; j < SK_ARRAY_COUNT(gFilterQualitys); j++) {
x = SkIntToScalar(10)/scale;
for (size_t kx = 0; kx < SK_ARRAY_COUNT(gModes); kx++) {
for (size_t ky = 0; ky < SK_ARRAY_COUNT(gModes); ky++) {
@@ -135,7 +135,7 @@ protected:
makebm(&fTexture[i], gColorTypes[i], size, size);
}
#endif
- setup(&paint, fTexture[i], gFilterLevels[j], gModes[kx], gModes[ky]);
+ setup(&paint, fTexture[i], gFilterQualitys[j], gModes[kx], gModes[ky]);
paint.setDither(true);
canvas->save();
« no previous file with comments | « gm/tilemodes.cpp ('k') | include/core/SkPaint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698