| Index: src/core/SkPictureShader.h
|
| diff --git a/src/core/SkPictureShader.h b/src/core/SkPictureShader.h
|
| index 8cccd251d558db6d80d383e5c88bb1e3d1e4fdae..eb9c38b95b499f664074aedff4a27304bb361a99 100644
|
| --- a/src/core/SkPictureShader.h
|
| +++ b/src/core/SkPictureShader.h
|
| @@ -22,8 +22,8 @@ class SkPicture;
|
| */
|
| class SkPictureShader : public SkShader {
|
| public:
|
| - static SkShader* Create(const SkPicture*, TileMode, TileMode, const SkMatrix*,
|
| - const SkRect*);
|
| + static sk_sp<SkShader> Make(sk_sp<const SkPicture>, TileMode, TileMode, const SkMatrix*,
|
| + const SkRect*);
|
|
|
| SK_TO_STRING_OVERRIDE()
|
| SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureShader)
|
| @@ -42,18 +42,19 @@ protected:
|
| Context* onCreateContext(const ContextRec&, void* storage) const override;
|
|
|
| private:
|
| - SkPictureShader(const SkPicture*, TileMode, TileMode, const SkMatrix*, const SkRect*);
|
| + SkPictureShader(sk_sp<const SkPicture>, TileMode, TileMode, const SkMatrix*, const SkRect*);
|
|
|
| - SkShader* refBitmapShader(const SkMatrix&, const SkMatrix* localMatrix, const int maxTextureSize = 0) const;
|
| + sk_sp<SkShader> refBitmapShader(const SkMatrix&, const SkMatrix* localMatrix,
|
| + const int maxTextureSize = 0) const;
|
|
|
| - SkAutoTUnref<const SkPicture> fPicture;
|
| - SkRect fTile;
|
| - TileMode fTmx, fTmy;
|
| + sk_sp<const SkPicture> fPicture;
|
| + SkRect fTile;
|
| + TileMode fTmx, fTmy;
|
|
|
| class PictureShaderContext : public SkShader::Context {
|
| public:
|
| static Context* Create(void* storage, const SkPictureShader&, const ContextRec&,
|
| - SkShader* bitmapShader);
|
| + sk_sp<SkShader> bitmapShader);
|
|
|
| virtual ~PictureShaderContext();
|
|
|
| @@ -63,11 +64,12 @@ private:
|
| void shadeSpan(int x, int y, SkPMColor dstC[], int count) override;
|
|
|
| private:
|
| - PictureShaderContext(const SkPictureShader&, const ContextRec&, SkShader* bitmapShader);
|
| + PictureShaderContext(const SkPictureShader&, const ContextRec&,
|
| + sk_sp<SkShader> bitmapShader);
|
|
|
| - SkAutoTUnref<SkShader> fBitmapShader;
|
| - SkShader::Context* fBitmapShaderContext;
|
| - void* fBitmapShaderContextStorage;
|
| + sk_sp<SkShader> fBitmapShader;
|
| + SkShader::Context* fBitmapShaderContext;
|
| + void* fBitmapShaderContextStorage;
|
|
|
| typedef SkShader::Context INHERITED;
|
| };
|
|
|