Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Unified Diff: src/codec/SkCodecImageGenerator.cpp

Issue 2246143002: Support color xforms for kIndex8 pngs (Closed) Base URL: https://skia.googlesource.com/skia.git@xformpremul
Patch Set: Response to comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/codec/SkCodecPriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « no previous file | src/codec/SkCodecPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698