diff options
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r-- | src/gpu/GrContext.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index 93b8b31351..e6d5b4c576 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -205,7 +205,7 @@ void convolve_gaussian(GrDrawTarget* target, SkAutoTUnref<GrConvolutionEffect> conv(SkNEW_ARGS(GrConvolutionEffect, (texture, direction, radius, sigma))); - drawState->sampler(0)->setCustomStage(conv, sampleM); + drawState->sampler(0)->setEffect(conv, sampleM); target->drawSimpleRect(rect, NULL); } @@ -1345,7 +1345,7 @@ bool GrContext::readRenderTargetPixels(GrRenderTarget* target, matrix.setTranslate(SK_Scalar1 *left, SK_Scalar1 *top); } matrix.postIDiv(src->width(), src->height()); - drawState->sampler(0)->setCustomStage(stage, matrix); + drawState->sampler(0)->setEffect(stage, matrix); GrRect rect = GrRect::MakeWH(GrIntToScalar(width), GrIntToScalar(height)); fGpu->drawSimpleRect(rect, NULL); // we want to read back from the scratch's origin @@ -1553,7 +1553,7 @@ void GrContext::writeRenderTargetPixels(GrRenderTarget* target, drawState->setRenderTarget(target); matrix.setIDiv(texture->width(), texture->height()); - drawState->sampler(0)->setCustomStage(stage, matrix); + drawState->sampler(0)->setEffect(stage, matrix); fGpu->drawSimpleRect(GrRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height)), NULL); } @@ -1817,8 +1817,8 @@ GrTexture* GrContext::gaussianBlur(GrTexture* srcTexture, scale_rect(&dstRect, i < scaleFactorX ? 0.5f : 1.0f, i < scaleFactorY ? 0.5f : 1.0f); - paint.colorSampler(0)->setCustomStage(SkNEW_ARGS(GrSingleTextureEffect, - (srcTexture, true)), matrix)->unref(); + paint.colorSampler(0)->setEffect(SkNEW_ARGS(GrSingleTextureEffect, + (srcTexture, true)), matrix)->unref(); this->drawRectToRect(paint, dstRect, srcRect); srcRect = dstRect; srcTexture = dstTexture; @@ -1875,9 +1875,8 @@ GrTexture* GrContext::gaussianBlur(GrTexture* srcTexture, // FIXME: This should be mitchell, not bilinear. matrix.setIDiv(srcTexture->width(), srcTexture->height()); this->setRenderTarget(dstTexture->asRenderTarget()); - paint.colorSampler(0)->setCustomStage(SkNEW_ARGS(GrSingleTextureEffect, - (srcTexture, true)), - matrix)->unref(); + paint.colorSampler(0)->setEffect(SkNEW_ARGS(GrSingleTextureEffect,(srcTexture, true)), + matrix)->unref(); SkRect dstRect(srcRect); scale_rect(&dstRect, (float) scaleFactorX, (float) scaleFactorY); this->drawRectToRect(paint, dstRect, srcRect); |