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

Unified Diff: src/codec/SkJpegCodec.cpp

Issue 2196743002: Add SkColorSpace::Equals() API (Closed) Base URL: https://skia.googlesource.com/skia.git@cscleanup
Patch Set: Fix logic Created 4 years, 5 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 | « include/core/SkImageInfo.h ('k') | src/core/SkColorSpace.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkJpegCodec.cpp
diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp
index d158b4215a0a632f9e5b8ad2a6b61777c98c3bd5..2eea46bb2bb07caa64fc0c6cbc2a396769064e5f 100644
--- a/src/codec/SkJpegCodec.cpp
+++ b/src/codec/SkJpegCodec.cpp
@@ -475,10 +475,9 @@ bool SkJpegCodec::onDimensionsSupported(const SkISize& size) {
}
static bool needs_color_xform(const SkImageInfo& dstInfo, const SkImageInfo& srcInfo) {
- // FIXME (msarett):
- // Do a better check for color space equality.
return (kRGBA_F16_SkColorType == dstInfo.colorType()) ||
- (dstInfo.colorSpace() && (dstInfo.colorSpace() != srcInfo.colorSpace()));
+ (dstInfo.colorSpace() && !SkColorSpace::Equals(srcInfo.colorSpace(),
+ dstInfo.colorSpace()));
}
int SkJpegCodec::readRows(const SkImageInfo& dstInfo, void* dst, size_t rowBytes, int count) {
« no previous file with comments | « include/core/SkImageInfo.h ('k') | src/core/SkColorSpace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698