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

Unified Diff: src/gpu/GrColorSpaceXform.cpp

Issue 2329553002: Cleanup GPU gamut transformation code (Closed)
Patch Set: Switch from float[16] to SkMatrix44 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
« no previous file with comments | « include/gpu/GrColorSpaceXform.h ('k') | src/gpu/GrTextureParamsAdjuster.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrColorSpaceXform.cpp
diff --git a/src/gpu/GrColorSpaceXform.cpp b/src/gpu/GrColorSpaceXform.cpp
index c7be3065f3b4ee2d7879453793c865e20a6f4682..2d17610bdad23c8d231339889a58ee674aeb7e6a 100644
--- a/src/gpu/GrColorSpaceXform.cpp
+++ b/src/gpu/GrColorSpaceXform.cpp
@@ -35,13 +35,10 @@ static inline bool matrix_is_almost_identity(const SkMatrix44& m,
sk_float_almost_equals(m.getFloat(3, 3), 1.0f, tol);
}
-GrColorSpaceXform::GrColorSpaceXform(const SkMatrix44& srcToDst, SkAlphaType srcAlphaType)
- : fSrcAlphaType(srcAlphaType) {
- srcToDst.asColMajorf(fSrcToDst);
-}
+GrColorSpaceXform::GrColorSpaceXform(const SkMatrix44& srcToDst)
+ : fSrcToDst(srcToDst) {}
-sk_sp<GrColorSpaceXform> GrColorSpaceXform::Make(SkColorSpace* src, SkColorSpace* dst,
- SkAlphaType srcAlphaType) {
+sk_sp<GrColorSpaceXform> GrColorSpaceXform::Make(SkColorSpace* src, SkColorSpace* dst) {
if (!src || !dst) {
// Invalid
return nullptr;
@@ -59,5 +56,5 @@ sk_sp<GrColorSpaceXform> GrColorSpaceXform::Make(SkColorSpace* src, SkColorSpace
return nullptr;
}
- return sk_make_sp<GrColorSpaceXform>(srcToDst, srcAlphaType);
+ return sk_make_sp<GrColorSpaceXform>(srcToDst);
}
« no previous file with comments | « include/gpu/GrColorSpaceXform.h ('k') | src/gpu/GrTextureParamsAdjuster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698