OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #include "GrRenderTarget.h" | 9 #include "GrRenderTarget.h" |
10 | 10 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 } | 108 } |
109 | 109 |
110 int GrRenderTargetPriv::numStencilBits() const { | 110 int GrRenderTargetPriv::numStencilBits() const { |
111 return fRenderTarget->fStencilAttachment ? fRenderTarget->fStencilAttachment
->bits() : 0; | 111 return fRenderTarget->fStencilAttachment ? fRenderTarget->fStencilAttachment
->bits() : 0; |
112 } | 112 } |
113 | 113 |
114 const GrGpu::MultisampleSpecs& | 114 const GrGpu::MultisampleSpecs& |
115 GrRenderTargetPriv::getMultisampleSpecs(const GrStencilSettings& stencil) const
{ | 115 GrRenderTargetPriv::getMultisampleSpecs(const GrStencilSettings& stencil) const
{ |
116 return fRenderTarget->getGpu()->getMultisampleSpecs(fRenderTarget, stencil); | 116 return fRenderTarget->getGpu()->getMultisampleSpecs(fRenderTarget, stencil); |
117 } | 117 } |
118 | |
119 GrRenderTarget::SampleConfig GrRenderTarget::ComputeSampleConfig(const GrCaps& c
aps, | |
120 int sampleCnt)
{ | |
121 return (caps.usesMixedSamples() && sampleCnt > 0) | |
122 ? GrRenderTarget::kStencil_SampleConfig | |
123 : GrRenderTarget::kUnified_SampleConfig; | |
124 } | |
125 | |
OLD | NEW |