Index: src/codec/SkCodecImageGenerator.cpp |
diff --git a/src/codec/SkCodecImageGenerator.cpp b/src/codec/SkCodecImageGenerator.cpp |
index e579da92f6f435c8a34ba21aae5fdfb02f2cbe23..1bae1df856e1f5c8ca7a5a02b0ead1ddb72b976f 100644 |
--- a/src/codec/SkCodecImageGenerator.cpp |
+++ b/src/codec/SkCodecImageGenerator.cpp |
@@ -37,7 +37,12 @@ SkData* SkCodecImageGenerator::onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM) { |
bool SkCodecImageGenerator::onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, |
SkPMColor ctable[], int* ctableCount) { |
- SkCodec::Result result = fCodec->getPixels(info, pixels, rowBytes, nullptr, ctable, |
+ // FIXME (msarett): |
+ // We don't give the client the chance to request an SkColorSpace. Until we improve |
+ // the API, let's assume that they want legacy mode. |
+ SkImageInfo decodeInfo = info.makeColorSpace(nullptr); |
+ |
+ SkCodec::Result result = fCodec->getPixels(decodeInfo, pixels, rowBytes, nullptr, ctable, |
ctableCount); |
switch (result) { |
case SkCodec::kSuccess: |