| Index: src/gpu/effects/GrMatrixConvolutionEffect.cpp
|
| diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
|
| index 283138e1338eeffe7b1fd3d9cb88989dc7ed66ea..a793976f74882bd96a7a88c8b6fc8292d0bf1fca 100644
|
| --- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
|
| +++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
|
| @@ -25,10 +25,10 @@ public:
|
|
|
| static inline void GenKey(const GrDrawEffect&, const GrGLCaps&, GrEffectKeyBuilder*);
|
|
|
| - virtual void setData(const GrGLUniformManager&, const GrDrawEffect&) SK_OVERRIDE;
|
| + virtual void setData(const GrGLProgramResourceManager&, const GrDrawEffect&) SK_OVERRIDE;
|
|
|
| private:
|
| - typedef GrGLUniformManager::UniformHandle UniformHandle;
|
| + typedef GrGLProgramResourceManager::UniformHandle UniformHandle;
|
| typedef GrMatrixConvolutionEffect::TileMode TileMode;
|
| SkISize fKernelSize;
|
| TileMode fTileMode;
|
| @@ -158,7 +158,7 @@ void GrGLMatrixConvolutionEffect::GenKey(const GrDrawEffect& drawEffect,
|
| b->add32(key);
|
| }
|
|
|
| -void GrGLMatrixConvolutionEffect::setData(const GrGLUniformManager& uman,
|
| +void GrGLMatrixConvolutionEffect::setData(const GrGLProgramResourceManager& prman,
|
| const GrDrawEffect& drawEffect) {
|
| const GrMatrixConvolutionEffect& conv = drawEffect.castEffect<GrMatrixConvolutionEffect>();
|
| GrTexture& texture = *conv.texture(0);
|
| @@ -169,20 +169,20 @@ void GrGLMatrixConvolutionEffect::setData(const GrGLUniformManager& uman,
|
| float ySign = texture.origin() == kTopLeft_GrSurfaceOrigin ? 1.0f : -1.0f;
|
| imageIncrement[0] = 1.0f / texture.width();
|
| imageIncrement[1] = ySign / texture.height();
|
| - uman.set2fv(fImageIncrementUni, 1, imageIncrement);
|
| - uman.set2fv(fKernelOffsetUni, 1, conv.kernelOffset());
|
| - uman.set1fv(fKernelUni, fKernelSize.width() * fKernelSize.height(), conv.kernel());
|
| - uman.set1f(fGainUni, conv.gain());
|
| - uman.set1f(fBiasUni, conv.bias());
|
| + prman.set2fv(fImageIncrementUni, 1, imageIncrement);
|
| + prman.set2fv(fKernelOffsetUni, 1, conv.kernelOffset());
|
| + prman.set1fv(fKernelUni, fKernelSize.width() * fKernelSize.height(), conv.kernel());
|
| + prman.set1f(fGainUni, conv.gain());
|
| + prman.set1f(fBiasUni, conv.bias());
|
| const SkIRect& bounds = conv.bounds();
|
| float left = (float) bounds.left() / texture.width();
|
| float top = (float) bounds.top() / texture.height();
|
| float right = (float) bounds.right() / texture.width();
|
| float bottom = (float) bounds.bottom() / texture.height();
|
| if (texture.origin() == kBottomLeft_GrSurfaceOrigin) {
|
| - uman.set4f(fBoundsUni, left, 1.0f - bottom, right, 1.0f - top);
|
| + prman.set4f(fBoundsUni, left, 1.0f - bottom, right, 1.0f - top);
|
| } else {
|
| - uman.set4f(fBoundsUni, left, top, right, bottom);
|
| + prman.set4f(fBoundsUni, left, top, right, bottom);
|
| }
|
| }
|
|
|
|
|