Index: dm/DMSrcSink.cpp |
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp |
index 057b6ae480c857460fa81683211eea349e6eaae3..5b20e3959fbb0dcb95148c088868cc2cd09c8cb6 100644 |
--- a/dm/DMSrcSink.cpp |
+++ b/dm/DMSrcSink.cpp |
@@ -279,7 +279,7 @@ bool get_decode_info(SkImageInfo* decodeInfo, const SkImageInfo& defaultInfo, |
} |
Error test_gen(SkCanvas* canvas, SkData* data) { |
- SkImageGenerator* gen = SkCodecImageGenerator::NewFromEncodedCodec(data); |
+ SkAutoTDelete<SkImageGenerator> gen = SkCodecImageGenerator::NewFromEncodedCodec(data); |
if (!gen) { |
return "Could not create image generator."; |
} |
@@ -293,7 +293,7 @@ Error test_gen(SkCanvas* canvas, SkData* data) { |
return Error::Nonfatal("Skip testing non-opaque images to 565."); |
} |
- SkAutoTDelete<SkImage> image(SkImage::NewFromGenerator(gen, nullptr)); |
+ SkAutoTDelete<SkImage> image(SkImage::NewFromGenerator(gen.detach(), nullptr)); |
djsollen
2016/01/25 18:34:07
why do you need to detach here? Does SkImage prom
|
if (!image) { |
return "Could not create image from codec image generator."; |
} |