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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 * Initializes the GrPipelineBuilder based on a GrPaint, view matrix and ren
der target. Note | 42 * Initializes the GrPipelineBuilder based on a GrPaint, view matrix and ren
der target. Note |
43 * 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 |
44 * 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 |
45 * 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. |
46 */ | 46 */ |
47 void setFromPaint(const GrPaint&, GrRenderTarget*); | 47 void setFromPaint(const GrPaint&, GrRenderTarget*); |
48 | 48 |
49 /// @} | 49 /// @} |
50 | 50 |
51 /** | 51 /** |
52 * Depending on features available in the underlying 3D API and the color bl
end mode requested | |
53 * it may or may not be possible to correctly blend with fractional pixel co
verage generated by | |
54 * the fragment shader. | |
55 * | |
56 * This function considers the current GrPipelineBuilder and the draw target
's capabilities to | |
57 * determine whether coverage can be handled correctly. This function assume
s that the caller | |
58 * intends to specify fractional pixel coverage via a primitive processor bu
t may not have | |
59 * specified it yet. | |
60 */ | |
61 bool canUseFracCoveragePrimProc(GrColor color, const GrDrawTargetCaps& caps)
const; | |
62 | |
63 /** | |
64 * This function returns true if the render target destination pixel values
will be read for | 52 * This function returns true if the render target destination pixel values
will be read for |
65 * blending during draw. | 53 * blending during draw. |
66 */ | 54 */ |
67 bool willBlendWithDst(const GrPrimitiveProcessor*) const; | 55 bool willBlendWithDst(const GrPrimitiveProcessor*) const; |
68 | 56 |
69 /////////////////////////////////////////////////////////////////////////// | 57 /////////////////////////////////////////////////////////////////////////// |
70 /// @name Effect Stages | 58 /// @name Effect Stages |
71 /// Each stage hosts a GrProcessor. The effect produces an output color or c
overage in the | 59 /// Each stage hosts a GrProcessor. The effect produces an output color or c
overage in the |
72 /// fragment shader. Its inputs are the output from the previous stage as we
ll as some variables | 60 /// fragment shader. Its inputs are the output from the previous stage as we
ll as some variables |
73 /// available to it in the fragment and vertex shader (e.g. the vertex posit
ion, the dst color, | 61 /// available to it in the fragment and vertex shader (e.g. the vertex posit
ion, the dst color, |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 mutable GrProcOptInfo fCoverageProcInfo; | 441 mutable GrProcOptInfo fCoverageProcInfo; |
454 mutable bool fColorProcInfoValid; | 442 mutable bool fColorProcInfoValid; |
455 mutable bool fCoverageProcInfoValid; | 443 mutable bool fCoverageProcInfoValid; |
456 mutable GrColor fColorCache; | 444 mutable GrColor fColorCache; |
457 mutable GrColor fCoverageCache; | 445 mutable GrColor fCoverageCache; |
458 | 446 |
459 friend class GrPipeline; | 447 friend class GrPipeline; |
460 }; | 448 }; |
461 | 449 |
462 #endif | 450 #endif |
OLD | NEW |