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

Unified Diff: samplecode/SampleSubpixelTranslate.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 | « samplecode/SampleSlides.cpp ('k') | samplecode/SampleTextureDomain.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleSubpixelTranslate.cpp
diff --git a/samplecode/SampleSubpixelTranslate.cpp b/samplecode/SampleSubpixelTranslate.cpp
index 58ad07228d9a8ecbae3032e98d31017170055b80..fe8062b7a68f3c01ca739344d7a397fb962a529f 100644
--- a/samplecode/SampleSubpixelTranslate.cpp
+++ b/samplecode/SampleSubpixelTranslate.cpp
@@ -62,11 +62,11 @@ protected:
void onDrawContent(SkCanvas* canvas) SK_OVERRIDE {
- static const SkPaint::FilterLevel gLevels[] = {
- SkPaint::kNone_FilterLevel,
- SkPaint::kLow_FilterLevel,
- SkPaint::kMedium_FilterLevel,
- SkPaint::kHigh_FilterLevel
+ static const SkFilterQuality gQualitys[] = {
+ kNone_SkFilterQuality,
+ kLow_SkFilterQuality,
+ kMedium_SkFilterQuality,
+ kHigh_SkFilterQuality
};
SkPaint paint;
@@ -74,37 +74,37 @@ protected:
paint.setSubpixelText(true);
paint.setAntiAlias(true);
- for (size_t i = 0; i < SK_ARRAY_COUNT(gLevels); ++i) {
- paint.setFilterLevel(gLevels[i]);
+ for (size_t i = 0; i < SK_ARRAY_COUNT(gQualitys); ++i) {
+ paint.setFilterQuality(gQualitys[i]);
SkRect r = SkRect::MakeXYWH( fCurPos.fX + i * (fSize + 10), fCurPos.fY, fSize, fSize );
canvas->drawBitmapRect( fBM, r, &paint );
}
- canvas->drawText( "AA Scaled", strlen("AA Scaled"), fCurPos.fX + SK_ARRAY_COUNT(gLevels) * (fSize + 10), fCurPos.fY + fSize/2, paint );
+ canvas->drawText( "AA Scaled", strlen("AA Scaled"), fCurPos.fX + SK_ARRAY_COUNT(gQualitys) * (fSize + 10), fCurPos.fY + fSize/2, paint );
paint.setAntiAlias(false);
- for (size_t i = 0; i < SK_ARRAY_COUNT(gLevels); ++i) {
- paint.setFilterLevel(gLevels[i]);
+ for (size_t i = 0; i < SK_ARRAY_COUNT(gQualitys); ++i) {
+ paint.setFilterQuality(gQualitys[i]);
SkRect r = SkRect::MakeXYWH( fCurPos.fX + i * (fSize + 10), fCurPos.fY + fSize + 10, fSize, fSize );
canvas->drawBitmapRect( fBM, r, &paint );
}
- canvas->drawText( "Scaled", strlen("Scaled"), fCurPos.fX + SK_ARRAY_COUNT(gLevels) * (fSize + 10), fCurPos.fY + fSize + 10 + fSize/2, paint );
+ canvas->drawText( "Scaled", strlen("Scaled"), fCurPos.fX + SK_ARRAY_COUNT(gQualitys) * (fSize + 10), fCurPos.fY + fSize + 10 + fSize/2, paint );
paint.setAntiAlias(true);
- for (size_t i = 0; i < SK_ARRAY_COUNT(gLevels); ++i) {
- paint.setFilterLevel(gLevels[i]);
+ for (size_t i = 0; i < SK_ARRAY_COUNT(gQualitys); ++i) {
+ paint.setFilterQuality(gQualitys[i]);
canvas->drawBitmap( fBM, fCurPos.fX + i * (fBM.width() + 10), fCurPos.fY + 2*(fSize + 10), &paint );
}
- canvas->drawText( "AA No Scale", strlen("AA No Scale"), fCurPos.fX + SK_ARRAY_COUNT(gLevels) * (fBM.width() + 10), fCurPos.fY + 2*(fSize + 10) + fSize/2, paint );
+ canvas->drawText( "AA No Scale", strlen("AA No Scale"), fCurPos.fX + SK_ARRAY_COUNT(gQualitys) * (fBM.width() + 10), fCurPos.fY + 2*(fSize + 10) + fSize/2, paint );
paint.setAntiAlias(false);
- for (size_t i = 0; i < SK_ARRAY_COUNT(gLevels); ++i) {
- paint.setFilterLevel(gLevels[i]);
+ for (size_t i = 0; i < SK_ARRAY_COUNT(gQualitys); ++i) {
+ paint.setFilterQuality(gQualitys[i]);
canvas->drawBitmap( fBM, fCurPos.fX + i * (fBM.width() + 10), fCurPos.fY + 2*(fSize + 10) + fBM.height() + 10, &paint );
}
- canvas->drawText( "No Scale", strlen("No Scale"), fCurPos.fX + SK_ARRAY_COUNT(gLevels) * (fBM.width() + 10), fCurPos.fY + 2*(fSize + 10) + fBM.height() + 10 + fSize/2, paint );
+ canvas->drawText( "No Scale", strlen("No Scale"), fCurPos.fX + SK_ARRAY_COUNT(gQualitys) * (fBM.width() + 10), fCurPos.fY + 2*(fSize + 10) + fBM.height() + 10 + fSize/2, paint );
fCurPos.fX += fHorizontalVelocity;
« no previous file with comments | « samplecode/SampleSlides.cpp ('k') | samplecode/SampleTextureDomain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698