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 "effects/GrSingleTextureEffect.h" | 8 #include "effects/GrSingleTextureEffect.h" |
9 | 9 |
10 GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, | 10 GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, |
11 const SkMatrix& m, | 11 const SkMatrix& m, |
12 GrCoordSet coordSet) | 12 GrCoordSet coordSet, |
| 13 GrRenderTarget* dst) |
13 : fCoordTransform(coordSet, m, texture, GrTextureParams::kNone_FilterMode) | 14 : fCoordTransform(coordSet, m, texture, GrTextureParams::kNone_FilterMode) |
14 , fTextureAccess(texture) { | 15 , fTextureAccess(texture, GrTextureParams::kNone_FilterMode,SkShader::kClamp
_TileMode, dst) { |
15 this->addCoordTransform(&fCoordTransform); | 16 this->addCoordTransform(&fCoordTransform); |
16 this->addTextureAccess(&fTextureAccess); | 17 this->addTextureAccess(&fTextureAccess); |
17 } | 18 } |
18 | 19 |
19 GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, | 20 GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, |
20 const SkMatrix& m, | 21 const SkMatrix& m, |
21 GrTextureParams::FilterMode filterM
ode, | 22 GrTextureParams::FilterMode filterM
ode, |
22 GrCoordSet coordSet) | 23 GrCoordSet coordSet, |
| 24 GrRenderTarget* dst) |
23 : fCoordTransform(coordSet, m, texture, filterMode) | 25 : fCoordTransform(coordSet, m, texture, filterMode) |
24 , fTextureAccess(texture, filterMode) { | 26 , fTextureAccess(texture, filterMode, SkShader::kClamp_TileMode, dst) { |
25 this->addCoordTransform(&fCoordTransform); | 27 this->addCoordTransform(&fCoordTransform); |
26 this->addTextureAccess(&fTextureAccess); | 28 this->addTextureAccess(&fTextureAccess); |
27 } | 29 } |
28 | 30 |
29 GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, | 31 GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, |
30 const SkMatrix& m, | 32 const SkMatrix& m, |
31 const GrTextureParams& params, | 33 const GrTextureParams& params, |
32 GrCoordSet coordSet) | 34 GrCoordSet coordSet, |
| 35 GrRenderTarget* dst) |
33 : fCoordTransform(coordSet, m, texture, params.filterMode()) | 36 : fCoordTransform(coordSet, m, texture, params.filterMode()) |
34 , fTextureAccess(texture, params) { | 37 , fTextureAccess(texture, params, dst) { |
35 this->addCoordTransform(&fCoordTransform); | 38 this->addCoordTransform(&fCoordTransform); |
36 this->addTextureAccess(&fTextureAccess); | 39 this->addTextureAccess(&fTextureAccess); |
37 } | 40 } |
38 | 41 |
39 GrSingleTextureEffect::~GrSingleTextureEffect() { | 42 GrSingleTextureEffect::~GrSingleTextureEffect() { |
40 } | 43 } |
OLD | NEW |