aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTarget.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-05-03 08:47:00 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-03 08:47:01 -0700
commit92605b35efa0155c44d24bd8415b4cc1db8831db (patch)
tree02df8d88f0f90cdab30ef095629d13d6fd45ea46 /src/gpu/GrRenderTarget.cpp
parent871a0484305e9c051e2d78b62e1f2a5fa4bdb3a4 (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;
+}
+