diff options
author | 2013-03-20 17:32:27 +0000 | |
---|---|---|
committer | 2013-03-20 17:32:27 +0000 | |
commit | ae81d5c4aa1716756b2cfb4c44f27f4dce2716ef (patch) | |
tree | 019b5c1b55da3c7da77943f8b93f5cc28da090c2 /src/gpu/effects/GrSingleTextureEffect.cpp | |
parent | 723dd790fbef396cd5c6619d0a3656c641b0c3f5 (diff) |
Adds local coords to GrEffect system.
Effects can ask the builder for local coords which may or may not be distinct from positions.
GrEffectStage tracks changes to relationship between pos and local coords.
GrGLEffectMatrix and GrSingleTextureEffect can use either pos or textures as intput coords
GrSimpleTextureEffect now allows for an explicit texture coords attribute.
Review URL: https://codereview.chromium.org/12531015
git-svn-id: http://skia.googlecode.com/svn/trunk@8264 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/effects/GrSingleTextureEffect.cpp')
-rw-r--r-- | src/gpu/effects/GrSingleTextureEffect.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/gpu/effects/GrSingleTextureEffect.cpp b/src/gpu/effects/GrSingleTextureEffect.cpp index 7183ba3244..0c671f16d0 100644 --- a/src/gpu/effects/GrSingleTextureEffect.cpp +++ b/src/gpu/effects/GrSingleTextureEffect.cpp @@ -7,23 +7,32 @@ #include "effects/GrSingleTextureEffect.h" -GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, const SkMatrix& m) +GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, + const SkMatrix& m, + CoordsType coordsType) : fTextureAccess(texture) - , fMatrix(m) { + , fMatrix(m) + , fCoordsType(coordsType) { this->addTextureAccess(&fTextureAccess); } -GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, const SkMatrix& m, bool bilerp) +GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, + const SkMatrix& m, + bool bilerp, + CoordsType coordsType) : fTextureAccess(texture, bilerp) - , fMatrix(m) { + , fMatrix(m) + , fCoordsType(coordsType) { this->addTextureAccess(&fTextureAccess); } GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, const SkMatrix& m, - const GrTextureParams& params) + const GrTextureParams& params, + CoordsType coordsType) : fTextureAccess(texture, params) - , fMatrix(m) { + , fMatrix(m) + , fCoordsType(coordsType) { this->addTextureAccess(&fTextureAccess); } |