diff options
author | Ben Wagner <bungeman@google.com> | 2018-05-15 14:12:14 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-16 18:53:12 +0000 |
commit | bdf5433ab49b00df7c0f9185a68fc39f74cda409 (patch) | |
tree | fec7980683ba47019b3100161c95185bb6ba4294 /src/image/SkImage_Base.h | |
parent | 94f585ed091e252cd3cc741b19c8a226fe4a5eec (diff) |
SkImage::onRefEncoded to return sk_sp.
This changes SkImage::onRefEncoded and downstack calls to return sk_sp.
All of the values returned are already sk_sp, so this just updates the
API. This change is currently behind the new flag
SK_IGNORE_SKIMAGE_ONREFENCODED_CHANGE so that Chromium can be updated.
Change-Id: Ic53a88ae23fa8b3b41b84c4abdc4b74e9879da38
Reviewed-on: https://skia-review.googlesource.com/128311
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/image/SkImage_Base.h')
-rw-r--r-- | src/image/SkImage_Base.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/image/SkImage_Base.h b/src/image/SkImage_Base.h index c74a7b97e0..ba89585cf4 100644 --- a/src/image/SkImage_Base.h +++ b/src/image/SkImage_Base.h @@ -76,7 +76,11 @@ public: virtual sk_sp<SkImage> onMakeSubset(const SkIRect&) const = 0; +#if SK_IGNORE_SKIMAGE_ONREFENCODED_CHANGE virtual SkData* onRefEncoded() const { return nullptr; } +#else + virtual sk_sp<SkData> onRefEncoded() const { return nullptr; } +#endif virtual bool onAsLegacyBitmap(SkBitmap*) const; |