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); |