aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTarget.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-05-03 05:06:29 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-03 05:06:29 -0700
commitde5bf0cfeca908b81a28cc50065f7bc2da3d2fd1 (patch)
treee208e4b36c04587300639bfaf50ff21799c4a1a3 /src/gpu/GrRenderTarget.cpp
parent1cb00e42bff455e23f6883bf09680438fa631224 (diff)
Add Gr*Proxy classes
Diffstat (limited to 'src/gpu/GrRenderTarget.cpp')
-rw-r--r--src/gpu/GrRenderTarget.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp
index a6736403fc..ebbfae9b95 100644
--- a/src/gpu/GrRenderTarget.cpp
+++ b/src/gpu/GrRenderTarget.cpp
@@ -109,3 +109,11 @@ const GrGpu::MultisampleSpecs&
GrRenderTargetPriv::getMultisampleSpecs(const GrStencilSettings& stencil) const {
return fRenderTarget->getGpu()->getMultisampleSpecs(fRenderTarget, stencil);
}
+
+GrRenderTarget::SampleConfig GrRenderTarget::ComputeSampleConfig(const GrCaps& caps,
+ int sampleCnt) {
+ return (caps.usesMixedSamples() && sampleCnt > 0)
+ ? GrRenderTarget::kStencil_SampleConfig
+ : GrRenderTarget::kUnified_SampleConfig;
+}
+