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

Unified Diff: src/gpu/GrColorSpaceXform.cpp

Issue 2324843003: Fix storage of gamut transform matrices in SkColorSpace (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/gpu/GrColorSpaceXform.cpp
diff --git a/src/gpu/GrColorSpaceXform.cpp b/src/gpu/GrColorSpaceXform.cpp
index 8ff6fda0cbc80eebc1f49cfdc5c14be18f85746f..1eb73283563ed18a19cc7ff09fdf1326066d4673 100644
--- a/src/gpu/GrColorSpaceXform.cpp
+++ b/src/gpu/GrColorSpaceXform.cpp
@@ -37,7 +37,8 @@ static inline bool matrix_is_almost_identity(const SkMatrix44& m,
GrColorSpaceXform::GrColorSpaceXform(const SkMatrix44& srcToDst, SkAlphaType srcAlphaType)
: fSrcAlphaType(srcAlphaType) {
- srcToDst.asColMajorf(fSrcToDst);
+ // TODO: Fix this, and store things as column major!
+ srcToDst.asRowMajorf(fSrcToDst);
}
sk_sp<GrColorSpaceXform> GrColorSpaceXform::Make(SkColorSpace* src, SkColorSpace* dst,
@@ -52,8 +53,8 @@ sk_sp<GrColorSpaceXform> GrColorSpaceXform::Make(SkColorSpace* src, SkColorSpace
return nullptr;
}
- SkMatrix44 srcToDst = as_CSB(dst)->fromXYZD50();
- srcToDst.postConcat(src->toXYZD50());
+ SkMatrix44 srcToDst(SkMatrix44::kUninitialized_Constructor);
+ srcToDst.setConcat(as_CSB(dst)->fromXYZD50(), src->toXYZD50());
if (matrix_is_almost_identity(srcToDst)) {
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698