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; |