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

Unified Diff: src/gpu/GrDrawContext.cpp

Issue 2057613003: Fix GrDrawContextPriv::stencilRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: useHWAA Created 4 years, 6 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 | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/GrDrawContextPriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawContext.cpp
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
index 64ce0cec3134295cc3b4f5fca5a1e1ba789423ed..b5489f1123bd6ca427434ddec98f8a222a680cca 100644
--- a/src/gpu/GrDrawContext.cpp
+++ b/src/gpu/GrDrawContext.cpp
@@ -408,7 +408,7 @@ void GrDrawContextPriv::stencilPath(const GrPipelineBuilder& pipelineBuilder,
void GrDrawContextPriv::stencilRect(const GrFixedClip& clip,
const GrUserStencilSettings* ss,
- bool doAA,
+ bool useHWAA,
const SkMatrix& viewMatrix,
const SkRect& rect) {
ASSERT_SINGLE_OWNER_PRIV
@@ -419,17 +419,17 @@ void GrDrawContextPriv::stencilRect(const GrFixedClip& clip,
AutoCheckFlush acf(fDrawContext->fDrawingManager);
GrPaint paint;
- paint.setAntiAlias(doAA);
+ paint.setAntiAlias(useHWAA);
paint.setXPFactory(GrDisableColorXPFactory::Make());
- bool useHWAA;
- SkAutoTUnref<GrDrawBatch> batch(
- fDrawContext->getFillRectBatch(paint, viewMatrix, rect, &useHWAA));
- SkASSERT(batch);
+ SkASSERT(!useHWAA || fDrawContext->isStencilBufferMultisampled());
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
pipelineBuilder.setUserStencil(ss);
+ SkAutoTUnref<GrDrawBatch> batch(
+ GrRectBatchFactory::CreateNonAAFill(SK_ColorWHITE, viewMatrix, rect, nullptr, nullptr));
+
fDrawContext->getDrawTarget()->drawBatch(pipelineBuilder, fDrawContext, clip, batch);
}
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/GrDrawContextPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698