| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 default: | 74 default: |
| 75 GrCrash("Unexpected key."); | 75 GrCrash("Unexpected key."); |
| 76 } | 76 } |
| 77 SkString suffixedUniName; | 77 SkString suffixedUniName; |
| 78 if (NULL != suffix) { | 78 if (NULL != suffix) { |
| 79 suffixedUniName.append(uniName); | 79 suffixedUniName.append(uniName); |
| 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_Visibility, |
| 85 fUniType, | 85 fUniType, |
| 86 uniName, | 86 uniName, |
| 87 &uniName); | 87 &uniName); |
| 88 } | 88 } |
| 89 | 89 |
| 90 const char* varyingName = "MatrixCoord"; | 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); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 if (!fPrevMatrix.cheapEqualTo(combined)) { | 228 if (!fPrevMatrix.cheapEqualTo(combined)) { |
| 229 uniformManager.setSkMatrix(fUni, combined); | 229 uniformManager.setSkMatrix(fUni, combined); |
| 230 fPrevMatrix = combined; | 230 fPrevMatrix = combined; |
| 231 } | 231 } |
| 232 break; | 232 break; |
| 233 } | 233 } |
| 234 default: | 234 default: |
| 235 GrCrash("Unexpected uniform type."); | 235 GrCrash("Unexpected uniform type."); |
| 236 } | 236 } |
| 237 } | 237 } |
| OLD | NEW |