From 6516d4b831f40dd2d0bb2e7115f1fe47c97a2c83 Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Fri, 7 Feb 2014 14:04:48 +0000 Subject: [PATCH] Set scissor to clip bounding box when using GrConvexPolyEffect BUG=skia:2051 R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/156843005 git-svn-id: http://skia.googlecode.com/svn/trunk@13361 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/GrClipMaskManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp index 340ede0d31..c1c59734ab 100644 --- a/src/gpu/GrClipMaskManager.cpp +++ b/src/gpu/GrClipMaskManager.cpp @@ -174,7 +174,9 @@ bool GrClipMaskManager::setupClipping(const GrClipData* clipDataIn, if (effect) { are->set(fGpu->drawState()); fGpu->drawState()->addCoverageEffect(effect); - fGpu->disableScissor(); + SkIRect scissorSpaceIBounds(clipSpaceIBounds); + scissorSpaceIBounds.offset(-clipDataIn->fOrigin); + fGpu->enableScissor(scissorSpaceIBounds); this->setGpuStencil(); return true; }