aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image/SkImage_Base.h
diff options
context:
space:
mode:
authorGravatar Matt Sarett <msarett@google.com>2017-04-05 11:41:27 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-05 16:17:15 +0000
commitcb87423cffb22467033a9e4f932399fb970faab6 (patch)
treec923cbbd1f368f83e506d377aee8622d77f66c10 /src/image/SkImage_Base.h
parent944feea3d345616d62750faba6875a35c8d6712b (diff)
Add SkImage::makeColorSpace() to public API
Gives Chrome the flexibility to xform and cache SkImages before they reach the SkColorSpaceXformCanvas. Bug: skia: Change-Id: I1f188f385b953b5a958c15578ea66deffb4dc6c5 Reviewed-on: https://skia-review.googlesource.com/11290 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
Diffstat (limited to 'src/image/SkImage_Base.h')
-rw-r--r--src/image/SkImage_Base.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/image/SkImage_Base.h b/src/image/SkImage_Base.h
index 5bdf9403e5..062d785679 100644
--- a/src/image/SkImage_Base.h
+++ b/src/image/SkImage_Base.h
@@ -86,17 +86,10 @@ public:
fAddedToCache.store(true);
}
- // Transforms image into the input color space.
- sk_sp<SkImage> makeColorSpace(sk_sp<SkColorSpace> target) const;
-
virtual bool onPinAsTexture(GrContext*) const { return false; }
virtual void onUnpinAsTexture(GrContext*) const {}
-protected:
- virtual sk_sp<SkImage> onMakeColorSpace(sk_sp<SkColorSpace>) const {
- // TODO: Make this pure virtual.
- return sk_ref_sp(const_cast<SkImage_Base*>(this));
- }
+ virtual sk_sp<SkImage> onMakeColorSpace(sk_sp<SkColorSpace>) const = 0;
private:
// Set true by caches when they cache content that's derived from the current pixels.