aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-05 21:54:04 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-05 21:54:04 +0000
commit4ec4cf93b7822e0000102b165852ad623afcb84e (patch)
tree868a31e7e8697776ecd0861ed16b495d49f49d86 /src/gpu
parent818f73e9cf50c0796900f0fe8c55aa2b4ed80516 (diff)
alpha threshold bitmap shader
R=reed@google.com Author: bsalomon@google.com Review URL: https://chromiumcodereview.appspot.com/23707019 git-svn-id: http://skia.googlecode.com/svn/trunk@11122 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/SkGpuDevice.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 571b8a0a7d..ea8a06e632 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -535,6 +535,11 @@ inline bool skPaint2GrPaintShader(SkGpuDevice* dev,
return skPaint2GrPaintNoShader(dev, skPaint, false, constantColor, grPaint);
}
+ // SkShader::asNewEffect() may do offscreen rendering. Setup default drawing state
+ // Also require shader to set the render target .
+ GrContext::AutoWideOpenIdentityDraw awo(dev->context(), NULL);
+ GrContext::AutoRenderTarget(dev->context(), NULL);
+
// setup the shader as the first color effect on the paint
SkAutoTUnref<GrEffectRef> effect(shader->asNewEffect(dev->context(), skPaint));
if (NULL != effect.get()) {