aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/Gr1DKernelEffect.h
diff options
context:
space:
mode:
authorGravatar tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-12 17:23:52 +0000
committerGravatar tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-12 17:23:52 +0000
commitd0c1a06cb98dd4a009dfa79e37ba6ca23a8c180b (patch)
tree8da05f518d09f633dfd00f94b45593182089deac /src/gpu/effects/Gr1DKernelEffect.h
parentd7727ceb82e271f8b5580c51571c57b09c5e3ced (diff)
Introduces new SingleTextureEffect base class for GrCustomStage objects.
This class tracks the texture that the object uses. A future commit will get rid of the GrTexture pointer currenty stored in the GrDrawState, allowing us to have CustomStages *without* textures. Requires gyp change on next roll. http://codereview.appspot.com/6306097/ git-svn-id: http://skia.googlecode.com/svn/trunk@4576 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/effects/Gr1DKernelEffect.h')
-rw-r--r--src/gpu/effects/Gr1DKernelEffect.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gpu/effects/Gr1DKernelEffect.h b/src/gpu/effects/Gr1DKernelEffect.h
index b6e116fa96..9ef765268c 100644
--- a/src/gpu/effects/Gr1DKernelEffect.h
+++ b/src/gpu/effects/Gr1DKernelEffect.h
@@ -8,7 +8,7 @@
#ifndef Gr1DKernelEffect_DEFINED
#define Gr1DKernelEffect_DEFINED
-#include "GrCustomStage.h"
+#include "GrSingleTextureEffect.h"
/**
* Base class for 1D kernel effects. The kernel operates either in X or Y and
@@ -18,7 +18,7 @@
* read. Since the center pixel is also read, the total width is one larger than
* two times the radius.
*/
-class Gr1DKernelEffect : public GrCustomStage {
+class Gr1DKernelEffect : public GrSingleTextureEffect {
public:
enum Direction {
@@ -26,9 +26,11 @@ public:
kY_Direction,
};
- Gr1DKernelEffect(Direction direction,
+ Gr1DKernelEffect(GrTexture* texture,
+ Direction direction,
int radius)
- : fDirection(direction)
+ : GrSingleTextureEffect(texture)
+ , fDirection(direction)
, fRadius(radius) {}
virtual ~Gr1DKernelEffect() {};
@@ -44,7 +46,7 @@ private:
Direction fDirection;
int fRadius;
- typedef GrCustomStage INHERITED;
+ typedef GrSingleTextureEffect INHERITED;
};
#endif