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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 */ | 198 */ |
199 GrRenderTarget* getRenderTarget() const { return fRenderTarget.get(); } | 199 GrRenderTarget* getRenderTarget() const { return fRenderTarget.get(); } |
200 | 200 |
201 /** | 201 /** |
202 * Sets the render-target used at the next drawing call | 202 * Sets the render-target used at the next drawing call |
203 * | 203 * |
204 * @param target The render target to set. | 204 * @param target The render target to set. |
205 */ | 205 */ |
206 void setRenderTarget(GrRenderTarget* target) { fRenderTarget.reset(SkSafeRef
(target)); } | 206 void setRenderTarget(GrRenderTarget* target) { fRenderTarget.reset(SkSafeRef
(target)); } |
207 | 207 |
| 208 /** |
| 209 * Returns whether the rasterizer and stencil test (if any) will run at a hi
gher sample rate |
| 210 * than the color buffer. In is scenario, the higher sample rate is resolved
during blending. |
| 211 */ |
| 212 bool hasMixedSamples() const { |
| 213 return this->isHWAntialias() && !fRenderTarget->isMultisampled(); |
| 214 } |
| 215 |
208 /// @} | 216 /// @} |
209 | 217 |
210 /////////////////////////////////////////////////////////////////////////// | 218 /////////////////////////////////////////////////////////////////////////// |
211 /// @name Stencil | 219 /// @name Stencil |
212 //// | 220 //// |
213 | 221 |
214 const GrStencilSettings& getStencil() const { return fStencilSettings; } | 222 const GrStencilSettings& getStencil() const { return fStencilSettings; } |
215 | 223 |
216 /** | 224 /** |
217 * Sets the stencil settings to use for the next draw. | 225 * Sets the stencil settings to use for the next draw. |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 mutable GrProcOptInfo fCoverageProcInfo; | 444 mutable GrProcOptInfo fCoverageProcInfo; |
437 mutable bool fColorProcInfoValid; | 445 mutable bool fColorProcInfoValid; |
438 mutable bool fCoverageProcInfoValid; | 446 mutable bool fCoverageProcInfoValid; |
439 mutable GrColor fColorCache; | 447 mutable GrColor fColorCache; |
440 mutable GrColor fCoverageCache; | 448 mutable GrColor fCoverageCache; |
441 | 449 |
442 friend class GrPipeline; | 450 friend class GrPipeline; |
443 }; | 451 }; |
444 | 452 |
445 #endif | 453 #endif |
OLD | NEW |