Index: src/image/SkImage_Gpu.cpp |
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp |
index c795d54fcbb0aaf68bbd63c7e034cfda8e0f7af4..44bb71c0889ab311977e4929271b8e6506e94c29 100644 |
--- a/src/image/SkImage_Gpu.cpp |
+++ b/src/image/SkImage_Gpu.cpp |
@@ -315,12 +315,12 @@ sk_sp<SkImage> SkImage::makeTextureImage(GrContext *context) const { |
GrImageTextureMaker maker(context, cacher, this, kDisallow_CachingHint); |
return create_image_from_maker(&maker, at, this->uniqueID()); |
} |
- SkBitmap bmp; |
- if (!this->asLegacyBitmap(&bmp, kRO_LegacyBitmapMode)) { |
- return nullptr; |
+ |
robertphillips
2016/08/08 14:32:29
How do we know we're not in the SkImage_Generator
reed1
2016/08/08 15:19:30
Generator's have a cacherator (by definition), so
|
+ if (const SkBitmap* bmp = as_IB(this)->onPeekBitmap()) { |
+ GrBitmapTextureMaker maker(context, *bmp); |
+ return create_image_from_maker(&maker, at, this->uniqueID()); |
} |
- GrBitmapTextureMaker maker(context, bmp); |
- return create_image_from_maker(&maker, at, this->uniqueID()); |
+ return nullptr; |
} |
sk_sp<SkImage> SkImage::makeNonTextureImage() const { |