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 20 matching lines...) Expand all Loading... |
31 | 31 |
32 class GrPipelineBuilder { | 32 class GrPipelineBuilder { |
33 public: | 33 public: |
34 GrPipelineBuilder(); | 34 GrPipelineBuilder(); |
35 | 35 |
36 GrPipelineBuilder(const GrPipelineBuilder& pipelineBuilder) { | 36 GrPipelineBuilder(const GrPipelineBuilder& pipelineBuilder) { |
37 SkDEBUGCODE(fBlockEffectRemovalCnt = 0;) | 37 SkDEBUGCODE(fBlockEffectRemovalCnt = 0;) |
38 *this = pipelineBuilder; | 38 *this = pipelineBuilder; |
39 } | 39 } |
40 | 40 |
41 virtual ~GrPipelineBuilder(); | |
42 | |
43 /** | 41 /** |
44 * Initializes the GrPipelineBuilder based on a GrPaint, view matrix and ren
der target. Note | 42 * Initializes the GrPipelineBuilder based on a GrPaint, render target, and
clip. Note |
45 * that GrPipelineBuilder encompasses more than GrPaint. Aspects of GrPipeli
neBuilder that have | 43 * that GrPipelineBuilder encompasses more than GrPaint. Aspects of GrPipeli
neBuilder that have |
46 * no GrPaint equivalents are set to default values with the exception of ve
rtex attribute state | 44 * no GrPaint equivalents are set to default values with the exception of ve
rtex attribute state |
47 * which is unmodified by this function and clipping which will be enabled. | 45 * which is unmodified by this function and clipping which will be enabled. |
48 */ | 46 */ |
49 void setFromPaint(const GrPaint&, GrRenderTarget*, const GrClip&); | 47 GrPipelineBuilder(const GrPaint&, GrRenderTarget*, const GrClip&); |
| 48 |
| 49 virtual ~GrPipelineBuilder(); |
50 | 50 |
51 /////////////////////////////////////////////////////////////////////////// | 51 /////////////////////////////////////////////////////////////////////////// |
52 /// @name Fragment Processors | 52 /// @name Fragment Processors |
53 /// | 53 /// |
54 /// GrFragmentProcessors are used to compute per-pixel color and per-pixel f
ractional coverage. | 54 /// GrFragmentProcessors are used to compute per-pixel color and per-pixel f
ractional coverage. |
55 /// There are two chains of FPs, one for color and one for coverage. The fir
st FP in each | 55 /// There are two chains of FPs, one for color and one for coverage. The fir
st FP in each |
56 /// chain gets the initial color/coverage from the GrPrimitiveProcessor. It
computes an output | 56 /// chain gets the initial color/coverage from the GrPrimitiveProcessor. It
computes an output |
57 /// color/coverage which is fed to the next FP in the chain. The last color
and coverage FPs | 57 /// color/coverage which is fed to the next FP in the chain. The last color
and coverage FPs |
58 /// feed their output to the GrXferProcessor which controls blending. | 58 /// feed their output to the GrXferProcessor which controls blending. |
59 //// | 59 //// |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 mutable GrProcOptInfo fCoverageProcInfo; | 452 mutable GrProcOptInfo fCoverageProcInfo; |
453 mutable bool fColorProcInfoValid; | 453 mutable bool fColorProcInfoValid; |
454 mutable bool fCoverageProcInfoValid; | 454 mutable bool fCoverageProcInfoValid; |
455 mutable GrColor fColorCache; | 455 mutable GrColor fColorCache; |
456 mutable GrColor fCoverageCache; | 456 mutable GrColor fCoverageCache; |
457 | 457 |
458 friend class GrPipeline; | 458 friend class GrPipeline; |
459 }; | 459 }; |
460 | 460 |
461 #endif | 461 #endif |
OLD | NEW |