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

Unified Diff: src/effects/SkPictureImageFilter.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 | « src/effects/SkMatrixImageFilter.cpp ('k') | src/effects/SkTestImageFilters.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkPictureImageFilter.cpp
diff --git a/src/effects/SkPictureImageFilter.cpp b/src/effects/SkPictureImageFilter.cpp
index 391af1116927aca5903923a65b28aa780e52f5ed..d3bc15ce2334386511638c850ef3a56b8f37ce16 100644
--- a/src/effects/SkPictureImageFilter.cpp
+++ b/src/effects/SkPictureImageFilter.cpp
@@ -18,17 +18,17 @@ SkPictureImageFilter::SkPictureImageFilter(const SkPicture* picture, uint32_t un
, fPicture(SkSafeRef(picture))
, fCropRect(picture ? picture->cullRect() : SkRect::MakeEmpty())
, fPictureResolution(kDeviceSpace_PictureResolution)
- , fFilterLevel(SkPaint::kLow_FilterLevel) {
+ , fFilterQuality(kLow_SkFilterQuality) {
}
SkPictureImageFilter::SkPictureImageFilter(const SkPicture* picture, const SkRect& cropRect,
uint32_t uniqueID, PictureResolution pictureResolution,
- SkPaint::FilterLevel filterLevel)
+ SkFilterQuality filterQuality)
: INHERITED(0, 0, NULL, uniqueID)
, fPicture(SkSafeRef(picture))
, fCropRect(cropRect)
, fPictureResolution(pictureResolution)
- , fFilterLevel(filterLevel) {
+ , fFilterQuality(filterQuality) {
}
SkPictureImageFilter::~SkPictureImageFilter() {
@@ -59,13 +59,13 @@ SkFlattenable* SkPictureImageFilter::CreateProc(SkReadBuffer& buffer) {
if (kLocalSpace_PictureResolution == pictureResolution) {
//filterLevel is only serialized if pictureResolution is LocalSpace
- SkPaint::FilterLevel filterLevel;
+ SkFilterQuality filterQuality;
if (buffer.isVersionLT(SkReadBuffer::kPictureImageFilterLevel_Version)) {
- filterLevel = SkPaint::kLow_FilterLevel;
+ filterQuality = kLow_SkFilterQuality;
} else {
- filterLevel = (SkPaint::FilterLevel)buffer.readInt();
+ filterQuality = (SkFilterQuality)buffer.readInt();
}
- return CreateForLocalSpace(picture, cropRect, filterLevel);
+ return CreateForLocalSpace(picture, cropRect, filterQuality);
}
return Create(picture, cropRect);
}
@@ -86,7 +86,7 @@ void SkPictureImageFilter::flatten(SkWriteBuffer& buffer) const {
buffer.writeRect(fCropRect);
buffer.writeInt(fPictureResolution);
if (kLocalSpace_PictureResolution == fPictureResolution) {
- buffer.writeInt(fFilterLevel);
+ buffer.writeInt(fFilterQuality);
}
}
@@ -168,7 +168,7 @@ void SkPictureImageFilter::drawPictureAtLocalResolution(Proxy* proxy, SkBaseDevi
canvas.translate(-SkIntToScalar(deviceBounds.fLeft), -SkIntToScalar(deviceBounds.fTop));
canvas.concat(ctx.ctm());
SkPaint paint;
- paint.setFilterLevel(fFilterLevel);
+ paint.setFilterQuality(fFilterQuality);
canvas.drawBitmap(localDevice.get()->accessBitmap(false), SkIntToScalar(localIBounds.fLeft),
SkIntToScalar(localIBounds.fTop), &paint);
//canvas.drawPicture(fPicture);
« no previous file with comments | « src/effects/SkMatrixImageFilter.cpp ('k') | src/effects/SkTestImageFilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698