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

Unified Diff: include/effects/SkPictureImageFilter.h

Issue 1389063002: Revert of factories should return baseclass, allowing the impl to specialize (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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 | « include/effects/SkOffsetImageFilter.h ('k') | include/effects/SkPixelXorXfermode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkPictureImageFilter.h
diff --git a/include/effects/SkPictureImageFilter.h b/include/effects/SkPictureImageFilter.h
index 934d1324c02151319a0bb2cb537339903ad7bb63..231a492900bf089a4bfa08e96ad09f89accbc7f4 100644
--- a/include/effects/SkPictureImageFilter.h
+++ b/include/effects/SkPictureImageFilter.h
@@ -16,7 +16,7 @@
/**
* Refs the passed-in picture.
*/
- static SkImageFilter* Create(const SkPicture* picture) {
+ static SkPictureImageFilter* Create(const SkPicture* picture) {
return new SkPictureImageFilter(picture);
}
@@ -24,7 +24,7 @@
* Refs the passed-in picture. cropRect can be used to crop or expand the destination rect when
* the picture is drawn. (No scaling is implied by the dest rect; only the CTM is applied.)
*/
- static SkImageFilter* Create(const SkPicture* picture, const SkRect& cropRect) {
+ static SkPictureImageFilter* Create(const SkPicture* picture, const SkRect& cropRect) {
return new SkPictureImageFilter(picture, cropRect, kDeviceSpace_PictureResolution,
kLow_SkFilterQuality);
}
@@ -36,13 +36,12 @@
* expand the destination rect when the picture is drawn. (No scaling is implied by the
* dest rect; only the CTM is applied.)
*/
- static SkImageFilter* CreateForLocalSpace(const SkPicture* picture,
+ static SkPictureImageFilter* CreateForLocalSpace(const SkPicture* picture,
const SkRect& cropRect,
SkFilterQuality filterQuality) {
return new SkPictureImageFilter(picture, cropRect, kLocalSpace_PictureResolution,
filterQuality);
}
-
SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureImageFilter)
@@ -52,8 +51,10 @@
kLocalSpace_PictureResolution
};
+ explicit SkPictureImageFilter(const SkPicture* picture);
+ SkPictureImageFilter(const SkPicture* picture, const SkRect& cropRect,
+ PictureResolution, SkFilterQuality);
virtual ~SkPictureImageFilter();
-
/* Constructs an SkPictureImageFilter object from an SkReadBuffer.
* Note: If the SkPictureImageFilter object construction requires bitmap
* decoding, the decoder must be set on the SkReadBuffer parameter by calling
@@ -61,13 +62,11 @@
* @param SkReadBuffer Serialized picture data.
*/
void flatten(SkWriteBuffer&) const override;
- bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, SkBitmap* result,
- SkIPoint* offset) const override;
+ virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
+ SkBitmap* result, SkIPoint* offset) const override;
private:
- explicit SkPictureImageFilter(const SkPicture* picture);
- SkPictureImageFilter(const SkPicture* picture, const SkRect& cropRect,
- PictureResolution, SkFilterQuality);
+
void drawPictureAtDeviceResolution(SkBaseDevice*, const SkIRect& deviceBounds,
const Context&) const;
@@ -78,7 +77,6 @@
SkRect fCropRect;
PictureResolution fPictureResolution;
SkFilterQuality fFilterQuality;
-
typedef SkImageFilter INHERITED;
};
« no previous file with comments | « include/effects/SkOffsetImageFilter.h ('k') | include/effects/SkPixelXorXfermode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698