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

Unified Diff: include/effects/SkPictureImageFilter.h

Issue 787073003: Adding an option for pixelated rendering in SkPictureImageFilter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: filter level Created 6 years 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
Index: include/effects/SkPictureImageFilter.h
diff --git a/include/effects/SkPictureImageFilter.h b/include/effects/SkPictureImageFilter.h
index 8c3c9c46ec9d24188a2afbb27448ccf65ffc172a..9db6f2fc6a30ff779764cb68dee4d3744ffac0d5 100644
--- a/include/effects/SkPictureImageFilter.h
+++ b/include/effects/SkPictureImageFilter.h
@@ -27,7 +27,8 @@ public:
static SkPictureImageFilter* Create(const SkPicture* picture, const SkRect& cropRect,
uint32_t uniqueID = 0) {
return SkNEW_ARGS(SkPictureImageFilter, (picture, cropRect, uniqueID,
- kDeviceSpace_PictureResolution));
+ kDeviceSpace_PictureResolution,
+ SkPaint::kLow_FilterLevel));
}
/**
@@ -39,9 +40,10 @@ public:
*/
static SkPictureImageFilter* CreateForLocalSpace(const SkPicture* picture,
const SkRect& cropRect,
+ SkPaint::FilterLevel filterLevel,
uint32_t uniqueID = 0) {
return SkNEW_ARGS(SkPictureImageFilter, (picture, cropRect, uniqueID,
- kLocalSpace_PictureResolution));
+ kLocalSpace_PictureResolution, filterLevel));
}
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureImageFilter)
@@ -54,7 +56,7 @@ protected:
explicit SkPictureImageFilter(const SkPicture* picture, uint32_t uniqueID);
SkPictureImageFilter(const SkPicture* picture, const SkRect& cropRect, uint32_t uniqueID,
- PictureResolution);
+ PictureResolution, SkPaint::FilterLevel);
virtual ~SkPictureImageFilter();
/* Constructs an SkPictureImageFilter object from an SkReadBuffer.
* Note: If the SkPictureImageFilter object construction requires bitmap
@@ -77,6 +79,7 @@ private:
const SkPicture* fPicture;
SkRect fCropRect;
PictureResolution fPictureResolution;
+ SkPaint::FilterLevel fFilterLevel;
typedef SkImageFilter INHERITED;
};

Powered by Google App Engine
This is Rietveld 408576698