OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrGLEffectMatrix.h" | 8 #include "GrGLEffectMatrix.h" |
9 #include "GrDrawEffect.h" | 9 #include "GrDrawEffect.h" |
10 #include "GrTexture.h" | 10 #include "GrTexture.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 suffixedUniName.append(suffix); | 80 suffixedUniName.append(suffix); |
81 uniName = suffixedUniName.c_str(); | 81 uniName = suffixedUniName.c_str(); |
82 } | 82 } |
83 if (kVoid_GrSLType != fUniType) { | 83 if (kVoid_GrSLType != fUniType) { |
84 fUni = builder->addUniform(GrGLShaderBuilder::kVertex_ShaderType, | 84 fUni = builder->addUniform(GrGLShaderBuilder::kVertex_ShaderType, |
85 fUniType, | 85 fUniType, |
86 uniName, | 86 uniName, |
87 &uniName); | 87 &uniName); |
88 } | 88 } |
89 | 89 |
90 const char* varyingName = "StageCoord"; | 90 const char* varyingName = "MatrixCoord"; |
91 SkString suffixedVaryingName; | 91 SkString suffixedVaryingName; |
92 if (NULL != suffix) { | 92 if (NULL != suffix) { |
93 suffixedVaryingName.append(varyingName); | 93 suffixedVaryingName.append(varyingName); |
94 suffixedVaryingName.append(suffix); | 94 suffixedVaryingName.append(suffix); |
95 varyingName = suffixedVaryingName.c_str(); | 95 varyingName = suffixedVaryingName.c_str(); |
96 } | 96 } |
97 const char* vsVaryingName; | 97 const char* vsVaryingName; |
98 const char* fsVaryingName; | 98 const char* fsVaryingName; |
99 builder->addVarying(varyingType, varyingName, &vsVaryingName, &fsVaryingName
); | 99 builder->addVarying(varyingType, varyingName, &vsVaryingName, &fsVaryingName
); |
100 | 100 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 if (!fPrevMatrix.cheapEqualTo(combined)) { | 229 if (!fPrevMatrix.cheapEqualTo(combined)) { |
230 uniformManager.setSkMatrix(fUni, combined); | 230 uniformManager.setSkMatrix(fUni, combined); |
231 fPrevMatrix = combined; | 231 fPrevMatrix = combined; |
232 } | 232 } |
233 break; | 233 break; |
234 } | 234 } |
235 default: | 235 default: |
236 GrCrash("Unexpected uniform type."); | 236 GrCrash("Unexpected uniform type."); |
237 } | 237 } |
238 } | 238 } |
OLD | NEW |