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

Unified Diff: src/android/SkBitmapRegionCodec.cpp

Issue 2319293003: Checking for valid colorType, alphaType, colorSpace in SkCodec (Closed)
Patch Set: Created 4 years, 3 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
Index: src/android/SkBitmapRegionCodec.cpp
diff --git a/src/android/SkBitmapRegionCodec.cpp b/src/android/SkBitmapRegionCodec.cpp
index 9c21484ec55294626913aa34183a3d1fa25ae588..063182f4761e85cccad275655ca7da55ae650638 100644
--- a/src/android/SkBitmapRegionCodec.cpp
+++ b/src/android/SkBitmapRegionCodec.cpp
@@ -135,5 +135,8 @@ bool SkBitmapRegionCodec::decodeRegion(SkBitmap* bitmap, SkBRDAllocator* allocat
}
bool SkBitmapRegionCodec::conversionSupported(SkColorType colorType) {
- return conversion_possible(fCodec->getInfo().makeColorType(colorType), fCodec->getInfo());
+ // Enable legacy behavior.
+ sk_sp<SkColorSpace> colorSpace = nullptr;
scroggo 2016/09/08 16:33:11 This looks to be unused
msarett 2016/09/08 16:49:45 Ahh thanks.
+ SkImageInfo dstInfo = fCodec->getInfo().makeColorType(colorType).makeColorSpace(nullptr);
+ return legacy_conversion_possible(dstInfo, fCodec->getInfo());
}
« no previous file with comments | « dm/DMSrcSink.cpp ('k') | src/codec/SkBmpCodec.cpp » ('j') | src/codec/SkCodecPriv.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698