| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2013 Google Inc. | 2  * Copyright 2013 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 "GrCustomCoordsTextureEffect.h" | 8 #include "GrCustomCoordsTextureEffect.h" | 
| 9 #include "gl/GrGLEffect.h" | 9 #include "gl/GrGLEffect.h" | 
| 10 #include "gl/GrGLShaderBuilder.h" | 10 #include "gl/GrGLShaderBuilder.h" | 
| (...skipping 28 matching lines...) Expand all  Loading... | 
| 39         builder->vsCodeAppendf("\t%s = %s;\n", vsVaryingName, attrName); | 39         builder->vsCodeAppendf("\t%s = %s;\n", vsVaryingName, attrName); | 
| 40 | 40 | 
| 41         builder->fsCodeAppendf("\t%s = ", outputColor); | 41         builder->fsCodeAppendf("\t%s = ", outputColor); | 
| 42         builder->fsAppendTextureLookupAndModulate(inputColor, | 42         builder->fsAppendTextureLookupAndModulate(inputColor, | 
| 43                                                   samplers[0], | 43                                                   samplers[0], | 
| 44                                                   fsCoordName.c_str(), | 44                                                   fsCoordName.c_str(), | 
| 45                                                   kVec2f_GrSLType); | 45                                                   kVec2f_GrSLType); | 
| 46         builder->fsCodeAppend(";\n"); | 46         builder->fsCodeAppend(";\n"); | 
| 47     } | 47     } | 
| 48 | 48 | 
| 49     virtual void setData(const GrGLUniformManager& uman, | 49     virtual void setData(const GrGLProgramDataManager& pdman, | 
| 50                          const GrDrawEffect& drawEffect) SK_OVERRIDE {} | 50                          const GrDrawEffect& drawEffect) SK_OVERRIDE {} | 
| 51 | 51 | 
| 52 private: | 52 private: | 
| 53     typedef GrGLVertexEffect INHERITED; | 53     typedef GrGLVertexEffect INHERITED; | 
| 54 }; | 54 }; | 
| 55 | 55 | 
| 56 /////////////////////////////////////////////////////////////////////////////// | 56 /////////////////////////////////////////////////////////////////////////////// | 
| 57 | 57 | 
| 58 GrCustomCoordsTextureEffect::GrCustomCoordsTextureEffect(GrTexture* texture, | 58 GrCustomCoordsTextureEffect::GrCustomCoordsTextureEffect(GrTexture* texture, | 
| 59                                                          const GrTextureParams& 
     params) | 59                                                          const GrTextureParams& 
     params) | 
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 98     }; | 98     }; | 
| 99     SkShader::TileMode tileModes[] = { | 99     SkShader::TileMode tileModes[] = { | 
| 100         kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], | 100         kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], | 
| 101         kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], | 101         kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], | 
| 102     }; | 102     }; | 
| 103     GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil
     erp_FilterMode : | 103     GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil
     erp_FilterMode : | 
| 104                                                            GrTextureParams::kNon
     e_FilterMode); | 104                                                            GrTextureParams::kNon
     e_FilterMode); | 
| 105 | 105 | 
| 106     return GrCustomCoordsTextureEffect::Create(textures[texIdx], params); | 106     return GrCustomCoordsTextureEffect::Create(textures[texIdx], params); | 
| 107 } | 107 } | 
| OLD | NEW | 
|---|