diff options
author | robertphillips <robertphillips@google.com> | 2014-07-14 07:53:26 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-07-14 07:53:27 -0700 |
commit | e8464994bbcc797b47a5ee24aa513530d2bade3b (patch) | |
tree | c4d7e01406adb135d67577de361c9f453de7960c /src/core | |
parent | 7e4b2b502718ef1cc9ce48670682603e9e2dc02f (diff) |
Make SkPictureShader and SkPictureImageFilter use const SkPictures
R=mtklein@google.com, reed@google.com
TBR=reed@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/390023002
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkPictureShader.cpp | 4 | ||||
-rw-r--r-- | src/core/SkPictureShader.h | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/core/SkPictureShader.cpp b/src/core/SkPictureShader.cpp index ab4de039fb..6ea67f8035 100644 --- a/src/core/SkPictureShader.cpp +++ b/src/core/SkPictureShader.cpp @@ -18,7 +18,7 @@ #include "GrContext.h" #endif -SkPictureShader::SkPictureShader(SkPicture* picture, TileMode tmx, TileMode tmy, +SkPictureShader::SkPictureShader(const SkPicture* picture, TileMode tmx, TileMode tmy, const SkMatrix* localMatrix) : INHERITED(localMatrix) , fPicture(SkRef(picture)) @@ -36,7 +36,7 @@ SkPictureShader::~SkPictureShader() { fPicture->unref(); } -SkPictureShader* SkPictureShader::Create(SkPicture* picture, TileMode tmx, TileMode tmy, +SkPictureShader* SkPictureShader::Create(const SkPicture* picture, TileMode tmx, TileMode tmy, const SkMatrix* localMatrix) { if (!picture || 0 == picture->width() || 0 == picture->height()) { return NULL; diff --git a/src/core/SkPictureShader.h b/src/core/SkPictureShader.h index 8df60306fd..00aee9b078 100644 --- a/src/core/SkPictureShader.h +++ b/src/core/SkPictureShader.h @@ -21,7 +21,7 @@ class SkPicture; */ class SkPictureShader : public SkShader { public: - static SkPictureShader* Create(SkPicture*, TileMode, TileMode, const SkMatrix* = NULL); + static SkPictureShader* Create(const SkPicture*, TileMode, TileMode, const SkMatrix* = NULL); virtual ~SkPictureShader(); virtual size_t contextSize() const SK_OVERRIDE; @@ -38,12 +38,12 @@ protected: virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_OVERRIDE; private: - SkPictureShader(SkPicture*, TileMode, TileMode, const SkMatrix* = NULL); + SkPictureShader(const SkPicture*, TileMode, TileMode, const SkMatrix* = NULL); SkShader* refBitmapShader(const SkMatrix&, const SkMatrix* localMatrix) const; - SkPicture* fPicture; - TileMode fTmx, fTmy; + const SkPicture* fPicture; + TileMode fTmx, fTmy; mutable SkMutex fCachedBitmapShaderMutex; mutable SkAutoTUnref<SkShader> fCachedBitmapShader; |