Index: src/image/SkImage_Generator.cpp |
diff --git a/src/image/SkImage_Generator.cpp b/src/image/SkImage_Generator.cpp |
index 20f4863d82f2a2839902cc7bf993af8a46014747..412f573ba6dbe38d3a9da521fdc48889715db07d 100644 |
--- a/src/image/SkImage_Generator.cpp |
+++ b/src/image/SkImage_Generator.cpp |
@@ -24,11 +24,13 @@ public: |
virtual SkImageInfo onImageInfo() const override { |
return fCache->info(); |
} |
+ SkAlphaType onAlphaType() const override { |
+ return fCache->info().alphaType(); |
+ } |
bool onReadPixels(const SkImageInfo&, void*, size_t, int srcX, int srcY, CachingHint) const override; |
SkImageCacherator* peekCacherator() const override { return fCache; } |
SkData* onRefEncoded(GrContext*) const override; |
- bool isOpaque() const override { return fCache->info().isOpaque(); } |
sk_sp<SkImage> onMakeSubset(const SkIRect&) const override; |
bool getROPixels(SkBitmap*, CachingHint) const override; |
GrTexture* asTextureRef(GrContext*, const GrTextureParams&, |
@@ -84,7 +86,7 @@ sk_sp<SkImage> SkImage_Generator::onMakeSubset(const SkIRect& subset) const { |
// For now, we do effectively what we did before, make it a raster |
const SkImageInfo info = SkImageInfo::MakeN32(subset.width(), subset.height(), |
- this->isOpaque() ? kOpaque_SkAlphaType : kPremul_SkAlphaType); |
+ this->alphaType()); |
auto surface(SkSurface::MakeRaster(info)); |
if (!surface) { |
return nullptr; |