| 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/GrGLSL.h" | 11 #include "gl/GrGLSL.h" |
| 11 #include "gl/GrGLTexture.h" | 12 #include "gl/GrGLTexture.h" |
| 12 #include "gl/GrGLVertexEffect.h" | 13 #include "gl/GrGLVertexEffect.h" |
| 13 #include "GrTBackendEffectFactory.h" | 14 #include "GrTBackendEffectFactory.h" |
| 14 #include "GrTexture.h" | 15 #include "GrTexture.h" |
| 15 | 16 |
| 16 class GrGLCustomCoordsTextureEffect : public GrGLVertexEffect { | 17 class GrGLCustomCoordsTextureEffect : public GrGLVertexEffect { |
| 17 public: | 18 public: |
| 18 GrGLCustomCoordsTextureEffect(const GrBackendEffectFactory& factory, const G
rDrawEffect& drawEffect) | 19 GrGLCustomCoordsTextureEffect(const GrBackendEffectFactory& factory, const G
rDrawEffect& drawEffect) |
| 19 : INHERITED (factory) {} | 20 : INHERITED (factory) {} |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 }; | 98 }; |
| 98 SkShader::TileMode tileModes[] = { | 99 SkShader::TileMode tileModes[] = { |
| 99 kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], | 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 }; | 102 }; |
| 102 GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil
erp_FilterMode : | 103 GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBil
erp_FilterMode : |
| 103 GrTextureParams::kNon
e_FilterMode); | 104 GrTextureParams::kNon
e_FilterMode); |
| 104 | 105 |
| 105 return GrCustomCoordsTextureEffect::Create(textures[texIdx], params); | 106 return GrCustomCoordsTextureEffect::Create(textures[texIdx], params); |
| 106 } | 107 } |
| OLD | NEW |