From 2683a4166a1b2e0ba09f43edb008cbaf785c3dc6 Mon Sep 17 00:00:00 2001 From: "tomhudson@google.com" Date: Fri, 20 Jul 2012 19:15:06 +0000 Subject: [PATCH] Fix build break in r4694: move reset() call before setting custom stage on sampler. Over-the-shoulder review by bsalomon@. http://codereview.appspot.com/6419061/ git-svn-id: http://skia.googlecode.com/svn/trunk@4700 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/SkGpuDevice.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 1dc17fb..bd92089 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -1610,6 +1610,7 @@ void SkGpuDevice::drawDevice(const SkDraw& draw, SkDevice* device, SkASSERT(NULL != devTex); SkImageFilter* filter = paint.getImageFilter(); + grPaint.textureSampler(kBitmapTextureIdx)->reset(); if (NULL != filter) { GrRect rect = GrRect::MakeWH(SkIntToScalar(devTex->width()), SkIntToScalar(devTex->height())); @@ -1618,6 +1619,7 @@ void SkGpuDevice::drawDevice(const SkDraw& draw, SkDevice* device, if (filteredTexture) { grPaint.textureSampler(kBitmapTextureIdx)->setCustomStage(SkNEW_ARGS (GrSingleTextureEffect, (filteredTexture)))->unref(); + grPaint.setTexture(kBitmapTextureIdx, NULL); devTex = filteredTexture; filteredTexture->unref(); } @@ -1628,9 +1630,6 @@ void SkGpuDevice::drawDevice(const SkDraw& draw, SkDevice* device, int h = bm.height(); GrContext::AutoMatrix avm(fContext, GrMatrix::I()); - - grPaint.textureSampler(kBitmapTextureIdx)->reset(); - GrRect dstRect = GrRect::MakeXYWH(GrIntToScalar(x), GrIntToScalar(y), GrIntToScalar(w), -- 2.7.4