aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrBicubicEffect.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-02 13:04:56 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-02 13:04:56 +0000
commit77af6805e5faea1e2a5c0220098aec9082f3a6e5 (patch)
treeda604c305177b007bb8a669ab753290143431ca8 /src/gpu/effects/GrBicubicEffect.h
parent693a837082404d212fd9b2c3d2ab65dd269211c9 (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/GrBicubicEffect.h')
-rw-r--r--src/gpu/effects/GrBicubicEffect.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gpu/effects/GrBicubicEffect.h b/src/gpu/effects/GrBicubicEffect.h
index 0a408916f1..eabc79fe56 100644
--- a/src/gpu/effects/GrBicubicEffect.h
+++ b/src/gpu/effects/GrBicubicEffect.h
@@ -11,7 +11,6 @@
#include "GrSingleTextureEffect.h"
#include "GrDrawEffect.h"
#include "gl/GrGLEffect.h"
-#include "gl/GrGLEffectMatrix.h"
#include "GrTBackendEffectFactory.h"
class GrGLBicubicEffect;
@@ -36,8 +35,8 @@ public:
static GrEffectRef* Create(GrTexture* tex, const SkScalar coefficients[16],
const SkMatrix& matrix,
const GrTextureParams& p,
- CoordsType coordsType = kLocal_CoordsType) {
- AutoEffectUnref effect(SkNEW_ARGS(GrBicubicEffect, (tex, coefficients, matrix, p, coordsType)));
+ GrCoordSet coordSet = kLocal_GrCoordSet) {
+ AutoEffectUnref effect(SkNEW_ARGS(GrBicubicEffect, (tex, coefficients, matrix, p, coordSet)));
return CreateEffectRef(effect);
}
@@ -48,14 +47,14 @@ public:
static GrEffectRef* Create(GrTexture* tex,
const SkMatrix& matrix,
const GrTextureParams& p,
- CoordsType coordsType = kLocal_CoordsType) {
- return Create(tex, gMitchellCoefficients, matrix, p, coordsType);
+ GrCoordSet coordSet = kLocal_GrCoordSet) {
+ return Create(tex, gMitchellCoefficients, matrix, p, coordSet);
}
private:
GrBicubicEffect(GrTexture*, const SkScalar coefficients[16]);
GrBicubicEffect(GrTexture*, const SkScalar coefficients[16],
- const SkMatrix &matrix, const GrTextureParams &p, CoordsType coordsType);
+ const SkMatrix &matrix, const GrTextureParams &p, GrCoordSet coordSet);
virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE;
float fCoefficients[16];