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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 222 |
223 /** | 223 /** |
224 * Sets the stencil settings to use for the next draw. | 224 * Sets the stencil settings to use for the next draw. |
225 * Changing the clip has the side-effect of possibly zeroing | 225 * Changing the clip has the side-effect of possibly zeroing |
226 * out the client settable stencil bits. So multipass algorithms | 226 * out the client settable stencil bits. So multipass algorithms |
227 * using stencil should not change the clip between passes. | 227 * using stencil should not change the clip between passes. |
228 * @param settings the stencil settings to use. | 228 * @param settings the stencil settings to use. |
229 */ | 229 */ |
230 void setStencil(const GrStencilSettings& settings) { fStencilSettings = sett
ings; } | 230 void setStencil(const GrStencilSettings& settings) { fStencilSettings = sett
ings; } |
231 | 231 |
232 /** | |
233 * Shortcut to disable stencil testing and ops. | |
234 */ | |
235 void disableStencil() { fStencilSettings.setDisabled(); } | |
236 | |
237 GrStencilSettings* stencil() { return &fStencilSettings; } | 232 GrStencilSettings* stencil() { return &fStencilSettings; } |
238 | 233 |
239 /** | 234 /** |
240 * AutoRestoreStencil | 235 * AutoRestoreStencil |
241 * | 236 * |
242 * This simple struct saves and restores the stencil settings | 237 * This simple struct saves and restores the stencil settings |
243 * This class can transiently modify its "const" GrPipelineBuilder object bu
t will restore it | 238 * This class can transiently modify its "const" GrPipelineBuilder object bu
t will restore it |
244 * when done - so it is notionally "const" correct. | 239 * when done - so it is notionally "const" correct. |
245 */ | 240 */ |
246 class AutoRestoreStencil : public ::SkNoncopyable { | 241 class AutoRestoreStencil : public ::SkNoncopyable { |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 FragmentProcessorArray fCoverageFragmentProcessors; | 404 FragmentProcessorArray fCoverageFragmentProcessors; |
410 GrClip fClip; | 405 GrClip fClip; |
411 | 406 |
412 mutable GrProcOptInfo fColorProcInfo; | 407 mutable GrProcOptInfo fColorProcInfo; |
413 mutable GrProcOptInfo fCoverageProcInfo; | 408 mutable GrProcOptInfo fCoverageProcInfo; |
414 | 409 |
415 friend class GrPipeline; | 410 friend class GrPipeline; |
416 }; | 411 }; |
417 | 412 |
418 #endif | 413 #endif |
OLD | NEW |