aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-05-16 13:14:03 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-05-16 13:14:03 +0000
commit27a4dc4c362a345431428cb61db27647ec1acd48 (patch)
tree0b135285a4bdb4288aebaf4b03dca79e01eda073
parentd757df2b1b770ec8eb206973f74076875b41b137 (diff)
Upload matrix as gl float rather than gr scalar (fixes a build break when scalar==fixed)
Review URL: http://codereview.appspot.com/4516051/ git-svn-id: http://skia.googlecode.com/svn/trunk@1329 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--gpu/src/GrGpuGLShaders.cpp41
1 files changed, 21 insertions, 20 deletions
diff --git a/gpu/src/GrGpuGLShaders.cpp b/gpu/src/GrGpuGLShaders.cpp
index 8965b06520..fcfc12039a 100644
--- a/gpu/src/GrGpuGLShaders.cpp
+++ b/gpu/src/GrGpuGLShaders.cpp
@@ -283,16 +283,16 @@ void GrGpuGLShaders::flushViewMatrix() {
// ES doesn't allow you to pass true to the transpose param,
// so do our own transpose
- GrScalar mt[] = {
- m[GrMatrix::kMScaleX],
- m[GrMatrix::kMSkewY],
- m[GrMatrix::kMPersp0],
- m[GrMatrix::kMSkewX],
- m[GrMatrix::kMScaleY],
- m[GrMatrix::kMPersp1],
- m[GrMatrix::kMTransX],
- m[GrMatrix::kMTransY],
- m[GrMatrix::kMPersp2]
+ GrGLfloat mt[] = {
+ GrScalarToFloat(m[GrMatrix::kMScaleX]),
+ GrScalarToFloat(m[GrMatrix::kMSkewY]),
+ GrScalarToFloat(m[GrMatrix::kMPersp0]),
+ GrScalarToFloat(m[GrMatrix::kMSkewX]),
+ GrScalarToFloat(m[GrMatrix::kMScaleY]),
+ GrScalarToFloat(m[GrMatrix::kMPersp1]),
+ GrScalarToFloat(m[GrMatrix::kMTransX]),
+ GrScalarToFloat(m[GrMatrix::kMTransY]),
+ GrScalarToFloat(m[GrMatrix::kMPersp2])
};
if (GrGLProgram::kSetAsAttribute ==
@@ -328,17 +328,18 @@ void GrGpuGLShaders::flushTextureMatrix(int s) {
// ES doesn't allow you to pass true to the transpose param,
// so do our own transpose
- GrScalar mt[] = {
- m[GrMatrix::kMScaleX],
- m[GrMatrix::kMSkewY],
- m[GrMatrix::kMPersp0],
- m[GrMatrix::kMSkewX],
- m[GrMatrix::kMScaleY],
- m[GrMatrix::kMPersp1],
- m[GrMatrix::kMTransX],
- m[GrMatrix::kMTransY],
- m[GrMatrix::kMPersp2]
+ GrGLfloat mt[] = {
+ GrScalarToFloat(m[GrMatrix::kMScaleX]),
+ GrScalarToFloat(m[GrMatrix::kMSkewY]),
+ GrScalarToFloat(m[GrMatrix::kMPersp0]),
+ GrScalarToFloat(m[GrMatrix::kMSkewX]),
+ GrScalarToFloat(m[GrMatrix::kMScaleY]),
+ GrScalarToFloat(m[GrMatrix::kMPersp1]),
+ GrScalarToFloat(m[GrMatrix::kMTransX]),
+ GrScalarToFloat(m[GrMatrix::kMTransY]),
+ GrScalarToFloat(m[GrMatrix::kMPersp2])
};
+
if (GrGLProgram::kSetAsAttribute ==
fProgramData->fUniLocations.fStages[s].fTextureMatrixUni) {
int baseIdx = GrGLProgram::TextureMatrixAttributeIdx(s);