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

Unified Diff: src/gpu/GrColorSpaceXform.cpp

Issue 2185533005: Simplify color space xform storage and usage (float[] vs. SkMatrix44) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add comment 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/gpu/GrColorSpaceXform.h ('k') | src/gpu/effects/GrBicubicEffect.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 f60dbcd1c02a7cfbaf64887f7000b8b75332a605..a1e89380482707cc24ac517c8024eb4c21cbcc2e 100644
--- a/src/gpu/GrColorSpaceXform.cpp
+++ b/src/gpu/GrColorSpaceXform.cpp
@@ -7,6 +7,7 @@
#include "GrColorSpaceXform.h"
#include "SkColorSpace.h"
+#include "SkMatrix44.h"
static inline bool sk_float_almost_equals(float x, float y, float tol) {
return sk_float_abs(x - y) <= tol;
@@ -33,6 +34,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) {
+ srcToDst.asColMajorf(fSrcToDst);
+}
+
sk_sp<GrColorSpaceXform> GrColorSpaceXform::Make(SkColorSpace* src, SkColorSpace* dst) {
if (!src || !dst) {
// Invalid
« no previous file with comments | « include/gpu/GrColorSpaceXform.h ('k') | src/gpu/effects/GrBicubicEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698