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

Unified Diff: src/gpu/glsl/GrGLSLProgramDataManager.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 | « src/gpu/glsl/GrGLSLProgramDataManager.h ('k') | src/gpu/glsl/GrGLSLShaderBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLProgramDataManager.cpp
diff --git a/src/gpu/glsl/GrGLSLProgramDataManager.cpp b/src/gpu/glsl/GrGLSLProgramDataManager.cpp
index 0c98e08edd2abec34a2f95f00f5e1f2f9ff6167d..0803f7af69d66c7128ef3b7616dcb15c7d688b4c 100644
--- a/src/gpu/glsl/GrGLSLProgramDataManager.cpp
+++ b/src/gpu/glsl/GrGLSLProgramDataManager.cpp
@@ -8,6 +8,7 @@
#include "glsl/GrGLSLProgramDataManager.h"
#include "SkMatrix.h"
+#include "SkMatrix44.h"
void GrGLSLProgramDataManager::setSkMatrix(UniformHandle u, const SkMatrix& matrix) const {
float mt[] = {
@@ -23,3 +24,10 @@ void GrGLSLProgramDataManager::setSkMatrix(UniformHandle u, const SkMatrix& matr
};
this->setMatrix3f(u, mt);
}
+
+void GrGLSLProgramDataManager::setSkMatrix44(UniformHandle u, const SkMatrix44& matrix) const {
+ // TODO: We could skip this temporary buffer if we had direct access to the matrix storage
+ float m[16];
+ matrix.asColMajorf(m);
+ this->setMatrix4f(u, m);
+}
« no previous file with comments | « src/gpu/glsl/GrGLSLProgramDataManager.h ('k') | src/gpu/glsl/GrGLSLShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698