Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Unified Diff: src/gpu/GrClipMaskManager.cpp

Issue 1031143002: Fix for ClipMaskManager drawSimpleRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrClipMaskManager.cpp
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 66d817ec00c74f44c04300e4b546dd268a0bf4d8..2f6f635d043eebe3ea6f14d5c30bf35fa6902645 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,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698