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

Unified Diff: src/gpu/GrGpu.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/GrGpu.h ('k') | src/gpu/GrPipeline.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpu.cpp
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index bee578a764ac8cd2c849a77a5b24a2c5fbb8cd40..1b9be53e1f2f16d5b730a464a0ef87094630b08e 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -19,6 +19,7 @@
#include "GrResourceProvider.h"
#include "GrRenderTargetPriv.h"
#include "GrStencilAttachment.h"
+#include "GrStencilSettings.h"
#include "GrSurfacePriv.h"
#include "GrTexturePriv.h"
#include "SkMathPriv.h"
@@ -442,10 +443,18 @@ void GrGpu::didWriteToSurface(GrSurface* surface, const SkIRect* bounds, uint32_
}
}
-const GrGpu::MultisampleSpecs& GrGpu::queryMultisampleSpecs(GrRenderTarget* rt,
- const GrStencilSettings& stencil) {
+const GrGpu::MultisampleSpecs& GrGpu::queryMultisampleSpecs(const GrPipeline& pipeline) {
+ GrRenderTarget* rt = pipeline.getRenderTarget();
SkASSERT(rt->desc().fSampleCnt > 1);
+ GrStencilSettings stencil;
+ if (pipeline.isStencilEnabled()) {
+ // TODO: attach stencil and create settings during render target flush.
+ SkASSERT(rt->renderTargetPriv().getStencilAttachment());
+ stencil.reset(*pipeline.getUserStencil(), pipeline.hasStencilClip(),
+ rt->renderTargetPriv().numStencilBits());
+ }
+
int effectiveSampleCnt;
SkSTArray<16, SkPoint, true> pattern;
this->onQueryMultisampleSpecs(rt, stencil, &effectiveSampleCnt, &pattern);
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrPipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698