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

Unified Diff: src/gpu/gl/GrGLGpu.cpp

Issue 2468653002: Remove GrStencilSettings from GrPipeline (Closed)
Patch Set: Remove GrStencilSettings from GrPipeline Created 4 years, 1 month 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/batches/GrDrawPathBatch.h ('k') | src/gpu/gl/GrGLPathRendering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 454753c4e927d23fe7cd6a7a946a0e2c78d69226..6d50ee29c4e878b97cdd77725d24e9a01d8c48f1 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -2052,10 +2052,17 @@ bool GrGLGpu::flushGLState(const GrPipeline& pipeline, const GrPrimitiveProcesso
program->setData(primProc, pipeline);
GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(pipeline.getRenderTarget());
- this->flushStencil(pipeline.getStencil());
+ GrStencilSettings stencil;
+ if (pipeline.isStencilEnabled()) {
+ // TODO: attach stencil and create settings during render target flush.
+ SkASSERT(glRT->renderTargetPriv().getStencilAttachment());
+ stencil.reset(*pipeline.getUserStencil(), pipeline.hasStencilClip(),
+ glRT->renderTargetPriv().numStencilBits());
+ }
+ this->flushStencil(stencil);
this->flushScissor(pipeline.getScissorState(), glRT->getViewport(), glRT->origin());
this->flushWindowRectangles(pipeline.getWindowRectsState(), glRT);
- this->flushHWAAState(glRT, pipeline.isHWAntialiasState(), !pipeline.getStencil().isDisabled());
+ this->flushHWAAState(glRT, pipeline.isHWAntialiasState(), stencil.isDisabled());
// This must come after textures are flushed because a texture may need
// to be msaa-resolved (which will modify bound FBO state).
« no previous file with comments | « src/gpu/batches/GrDrawPathBatch.h ('k') | src/gpu/gl/GrGLPathRendering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698