OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #ifndef GrPipelineBuilder_DEFINED | 8 #ifndef GrPipelineBuilder_DEFINED |
9 #define GrPipelineBuilder_DEFINED | 9 #define GrPipelineBuilder_DEFINED |
10 | 10 |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 * | 202 * |
203 * @param target The render target to set. | 203 * @param target The render target to set. |
204 */ | 204 */ |
205 void setRenderTarget(GrRenderTarget* target) { fRenderTarget.reset(SkSafeRef
(target)); } | 205 void setRenderTarget(GrRenderTarget* target) { fRenderTarget.reset(SkSafeRef
(target)); } |
206 | 206 |
207 /** | 207 /** |
208 * Returns whether the rasterizer and stencil test (if any) will run at a hi
gher sample rate | 208 * Returns whether the rasterizer and stencil test (if any) will run at a hi
gher sample rate |
209 * than the color buffer. In is scenario, the higher sample rate is resolved
during blending. | 209 * than the color buffer. In is scenario, the higher sample rate is resolved
during blending. |
210 */ | 210 */ |
211 bool hasMixedSamples() const { | 211 bool hasMixedSamples() const { |
212 return this->isHWAntialias() && !fRenderTarget->isUnifiedMultisampled(); | 212 return fRenderTarget->hasMixedSamples() && |
| 213 (this->isHWAntialias() || !fStencilSettings.isDisabled()); |
213 } | 214 } |
214 | 215 |
215 /// @} | 216 /// @} |
216 | 217 |
217 /////////////////////////////////////////////////////////////////////////// | 218 /////////////////////////////////////////////////////////////////////////// |
218 /// @name Stencil | 219 /// @name Stencil |
219 //// | 220 //// |
220 | 221 |
221 const GrStencilSettings& getStencil() const { return fStencilSettings; } | 222 const GrStencilSettings& getStencil() const { return fStencilSettings; } |
222 | 223 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 FragmentProcessorArray fCoverageFragmentProcessors; | 405 FragmentProcessorArray fCoverageFragmentProcessors; |
405 GrClip fClip; | 406 GrClip fClip; |
406 | 407 |
407 mutable GrProcOptInfo fColorProcInfo; | 408 mutable GrProcOptInfo fColorProcInfo; |
408 mutable GrProcOptInfo fCoverageProcInfo; | 409 mutable GrProcOptInfo fCoverageProcInfo; |
409 | 410 |
410 friend class GrPipeline; | 411 friend class GrPipeline; |
411 }; | 412 }; |
412 | 413 |
413 #endif | 414 #endif |
OLD | NEW |