diff options
author | 2013-10-02 13:04:56 +0000 | |
---|---|---|
committer | 2013-10-02 13:04:56 +0000 | |
commit | 77af6805e5faea1e2a5c0220098aec9082f3a6e5 (patch) | |
tree | da604c305177b007bb8a669ab753290143431ca8 /src/gpu/effects/GrSingleTextureEffect.cpp | |
parent | 693a837082404d212fd9b2c3d2ab65dd269211c9 (diff) |
Make GPU coord transforms automatic
Adds a GrCoordTransform class and updates the framework to handle
coord transforms similar to how it handles textures with
GrTextureAccess. Renames GrGLEffectMatrix to GrGLCoordTransform and
slightly repurposes it to be used by the framework instead of effects.
R=bsalomon@google.com, robertphillips@google.com
Review URL: https://codereview.chromium.org/24853002
git-svn-id: http://skia.googlecode.com/svn/trunk@11569 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/effects/GrSingleTextureEffect.cpp')
-rw-r--r-- | src/gpu/effects/GrSingleTextureEffect.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gpu/effects/GrSingleTextureEffect.cpp b/src/gpu/effects/GrSingleTextureEffect.cpp index 532ce04217..3ab5e3ae05 100644 --- a/src/gpu/effects/GrSingleTextureEffect.cpp +++ b/src/gpu/effects/GrSingleTextureEffect.cpp @@ -9,30 +9,30 @@ GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, const SkMatrix& m, - CoordsType coordsType) - : fTextureAccess(texture) - , fMatrix(m) - , fCoordsType(coordsType) { + GrCoordSet coordSet) + : fCoordTransform(coordSet, m, texture) + , fTextureAccess(texture) { + this->addCoordTransform(&fCoordTransform); this->addTextureAccess(&fTextureAccess); } GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, const SkMatrix& m, GrTextureParams::FilterMode filterMode, - CoordsType coordsType) - : fTextureAccess(texture, filterMode) - , fMatrix(m) - , fCoordsType(coordsType) { + GrCoordSet coordSet) + : fCoordTransform(coordSet, m, texture) + , fTextureAccess(texture, filterMode) { + this->addCoordTransform(&fCoordTransform); this->addTextureAccess(&fTextureAccess); } GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, const SkMatrix& m, const GrTextureParams& params, - CoordsType coordsType) - : fTextureAccess(texture, params) - , fMatrix(m) - , fCoordsType(coordsType) { + GrCoordSet coordSet) + : fCoordTransform(coordSet, m, texture) + , fTextureAccess(texture, params) { + this->addCoordTransform(&fCoordTransform); this->addTextureAccess(&fTextureAccess); } |