Move convolution from code in GrGLProgram to new GrConvolutionEffect
class. This is the first test of the new Ganesh shader pipeline.
Also includes some cleanup of the gpu.gyp file: added src/gpu, allowing
us to remove ../ from many #include directives.
http://codereview.appspot.com/6199053/
git-svn-id: http://skia.googlecode.com/svn/trunk@3887 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 58f8440..5d58f1e 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -11,6 +11,7 @@
#include "GrBufferAllocPool.h"
#include "GrClipIterator.h"
+#include "effects/GrConvolutionEffect.h"
#include "GrGpu.h"
#include "GrIndexBuffer.h"
#include "GrInOrderDrawBuffer.h"
@@ -296,8 +297,8 @@
drawState->sampler(0)->reset(GrSamplerState::kClamp_WrapMode,
GrSamplerState::kConvolution_Filter,
sampleM);
- drawState->sampler(0)->setConvolutionParams(kernelWidth, kernel);
- drawState->sampler(0)->setFilterDirection(direction);
+ drawState->sampler(0)->setCustomStage(
+ new GrConvolutionEffect(direction, kernelWidth, kernel));
drawState->setTexture(0, texture);
gpu->drawSimpleRect(rect, NULL, 1 << 0);
}