aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-20 19:15:06 +0000
committerGravatar tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-20 19:15:06 +0000
commit2683a4166a1b2e0ba09f43edb008cbaf785c3dc6 (patch)
tree80ed5c19485f1df0ec73bf07532088de838029d4 /src/gpu
parent1c46d2d2695d7b05877fca94247fd53f5ae89293 (diff)
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
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/SkGpuDevice.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 1dc17fb610..bd92089cc7 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),