| 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 30 matching lines...) Expand all  Loading... | 
| 41         key |= kIdentity_MatrixType; | 41         key |= kIdentity_MatrixType; | 
| 42     } | 42     } | 
| 43     return key; | 43     return key; | 
| 44 } | 44 } | 
| 45 | 45 | 
| 46 GrSLType GrGLEffectMatrix::emitCode(GrGLShaderBuilder* builder, | 46 GrSLType GrGLEffectMatrix::emitCode(GrGLShaderBuilder* builder, | 
| 47                                     EffectKey key, | 47                                     EffectKey key, | 
| 48                                     const char** fsCoordName, | 48                                     const char** fsCoordName, | 
| 49                                     const char** vsCoordName, | 49                                     const char** vsCoordName, | 
| 50                                     const char* suffix) { | 50                                     const char* suffix) { | 
| 51     GrSLType varyingType; | 51     GrSLType varyingType = kVoid_GrSLType; | 
| 52     const char* uniName; | 52     const char* uniName; | 
| 53     key &= kKeyMask; | 53     key &= kKeyMask; | 
| 54     switch (key & kMatrixTypeKeyMask) { | 54     switch (key & kMatrixTypeKeyMask) { | 
| 55         case kIdentity_MatrixType: | 55         case kIdentity_MatrixType: | 
| 56             fUniType = kVoid_GrSLType; | 56             fUniType = kVoid_GrSLType; | 
| 57             varyingType = kVec2f_GrSLType; | 57             varyingType = kVec2f_GrSLType; | 
| 58             break; | 58             break; | 
| 59         case kTrans_MatrixType: | 59         case kTrans_MatrixType: | 
| 60             fUniType = kVec2f_GrSLType; | 60             fUniType = kVec2f_GrSLType; | 
| 61             uniName = "StageTranslate"; | 61             uniName = "StageTranslate"; | 
| (...skipping 167 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 | 
|---|