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

Unified Diff: include/effects/SkPictureImageFilter.h

Issue 390023002: Make SkPictureShader and SkPictureImageFilter use const SkPictures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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 | « no previous file | src/core/SkPictureShader.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 fe07215c0b96525acd507c6cf54bc6130dae96f3..84d0c10016d027efb003ac31f8763c4a8ebb7566 100644
--- a/include/effects/SkPictureImageFilter.h
+++ b/include/effects/SkPictureImageFilter.h
@@ -16,7 +16,7 @@ public:
/**
* Refs the passed-in picture.
*/
- static SkPictureImageFilter* Create(SkPicture* picture) {
+ static SkPictureImageFilter* Create(const SkPicture* picture) {
return SkNEW_ARGS(SkPictureImageFilter, (picture));
}
@@ -24,15 +24,15 @@ public:
* 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 SkPictureImageFilter* Create(SkPicture* picture, const SkRect& cropRect) {
+ static SkPictureImageFilter* Create(const SkPicture* picture, const SkRect& cropRect) {
return SkNEW_ARGS(SkPictureImageFilter, (picture, cropRect));
}
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureImageFilter)
protected:
- explicit SkPictureImageFilter(SkPicture* picture);
- SkPictureImageFilter(SkPicture* picture, const SkRect& cropRect);
+ explicit SkPictureImageFilter(const SkPicture* picture);
+ SkPictureImageFilter(const SkPicture* picture, const SkRect& cropRect);
virtual ~SkPictureImageFilter();
/* Constructs an SkPictureImageFilter object from an SkReadBuffer.
* Note: If the SkPictureImageFilter object construction requires bitmap
@@ -48,8 +48,8 @@ protected:
SkIRect* dst) const SK_OVERRIDE;
private:
- SkPicture* fPicture;
- SkRect fCropRect;
+ const SkPicture* fPicture;
+ SkRect fCropRect;
typedef SkImageFilter INHERITED;
};
« no previous file with comments | « no previous file | src/core/SkPictureShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698