aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-03-25 07:16:21 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-03-25 07:16:21 -0700
commit73bb4562a631d54ee2343ce2becea0070eb31a80 (patch)
tree464bc51a535f1c17a9fed97ec579722bd1deb21f /src
parent648ac53ea3d707e46d3fa32904db41af4b46eafd (diff)
Fix for ClipMaskManager drawSimpleRect
BUG=chromium:466819 Review URL: https://codereview.chromium.org/1031143002
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrClipMaskManager.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 66d817ec00..2f6f635d04 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -479,6 +479,9 @@ void GrClipMaskManager::mergeMask(GrPipelineBuilder* pipelineBuilder,
GrTextureDomain::MakeTexelDomain(srcMask, srcBound),
GrTextureDomain::kDecal_Mode,
GrTextureParams::kNone_FilterMode))->unref();
+ // We need this AGP until everything is in GrBatch
+ GrDrawTarget::AutoGeometryPush agp(fClipTarget);
+
// The color passed in here does not matter since the coverageSetOpXP won't read it.
fClipTarget->drawSimpleRect(pipelineBuilder,
GrColor_WHITE,
@@ -670,6 +673,9 @@ GrTexture* GrClipMaskManager::createAlphaClipMask(int32_t elementsGenID,
0x0000,
0xffff);
backgroundPipelineBuilder.setStencil(kDrawOutsideElement);
+
+ // We need this AGP until everything is in GrBatch
+ GrDrawTarget::AutoGeometryPush agp(fClipTarget);
// The color passed in here does not matter since the coverageSetOpXP won't read it.
fClipTarget->drawSimpleRect(&backgroundPipelineBuilder, GrColor_WHITE, translate,
clipSpaceIBounds);
@@ -806,6 +812,9 @@ bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt,
0xffff);
if (Element::kRect_Type == element->getType()) {
*pipelineBuilder.stencil() = gDrawToStencil;
+
+ // We need this AGP until everything is in GrBatch
+ GrDrawTarget::AutoGeometryPush agp(fClipTarget);
fClipTarget->drawSimpleRect(&pipelineBuilder,
GrColor_WHITE,
viewMatrix,
@@ -834,6 +843,8 @@ bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt,
if (canDrawDirectToClip) {
if (Element::kRect_Type == element->getType()) {
+ // We need this AGP until everything is in GrBatch
+ GrDrawTarget::AutoGeometryPush agp(fClipTarget);
fClipTarget->drawSimpleRect(&pipelineBuilderCopy,
GrColor_WHITE,
viewMatrix,
@@ -844,6 +855,9 @@ bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt,
viewMatrix, clipPath, stroke, false);
}
} else {
+ // We need this AGP until everything is in GrBatch
+ GrDrawTarget::AutoGeometryPush agp(fClipTarget);
+
// The view matrix is setup to do clip space -> stencil space translation, so
// draw rect in clip space.
fClipTarget->drawSimpleRect(&pipelineBuilderCopy,