OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 GrGLProgramDesc_DEFINED | 8 #ifndef GrGLProgramDesc_DEFINED |
9 #define GrGLProgramDesc_DEFINED | 9 #define GrGLProgramDesc_DEFINED |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 const GrGpuGL* gpu, | 48 const GrGpuGL* gpu, |
49 const GrRenderTarget* dummyDstRenderTarget, | 49 const GrRenderTarget* dummyDstRenderTarget, |
50 const GrTexture* dummyDstCopyTexture, | 50 const GrTexture* dummyDstCopyTexture, |
51 const GrEffectStage* geometryProcessor, | 51 const GrEffectStage* geometryProcessor, |
52 const GrEffectStage* stages[], | 52 const GrEffectStage* stages[], |
53 int numColorStages, | 53 int numColorStages, |
54 int numCoverageStages, | 54 int numCoverageStages, |
55 int currAttribIndex); | 55 int currAttribIndex); |
56 | 56 |
57 /** | 57 /** |
58 * Builds a program descriptor from a GrOptDrawState. Whether the primitive
type is points, and | 58 * Builds a program descriptor from a GrDrawState. Whether the primitive typ
e is points, the |
59 * the caps of the GrGpuGL are also inputs. It also outputs the color and co
verage stages | 59 * output of GrDrawState::getBlendOpts, and the caps of the GrGpuGL are also
inputs. It also |
60 * referenced by the generated descriptor. Coverage stages from the drawStat
e may be treated as | 60 * outputs the color and coverage stages referenced by the generated descrip
tor. This may |
61 * color stages in the output. | 61 * not contain all stages from the draw state and coverage stages from the d
rawState may |
| 62 * be treated as color stages in the output. |
62 */ | 63 */ |
63 static bool Build(const GrOptDrawState&, | 64 static bool Build(const GrDrawState&, |
64 GrGpu::DrawType drawType, | 65 GrGpu::DrawType drawType, |
| 66 GrDrawState::BlendOptFlags, |
65 GrBlendCoeff srcCoeff, | 67 GrBlendCoeff srcCoeff, |
66 GrBlendCoeff dstCoeff, | 68 GrBlendCoeff dstCoeff, |
67 const GrGpuGL* gpu, | 69 const GrGpuGL* gpu, |
68 const GrDeviceCoordTexture* dstCopy, | 70 const GrDeviceCoordTexture* dstCopy, |
69 const GrEffectStage** outGeometryProcessor, | 71 const GrEffectStage** outGeometryProcessor, |
70 SkTArray<const GrEffectStage*, true>* outColorStages, | 72 SkTArray<const GrEffectStage*, true>* outColorStages, |
71 SkTArray<const GrEffectStage*, true>* outCoverageStages, | 73 SkTArray<const GrEffectStage*, true>* outCoverageStages, |
72 GrGLProgramDesc* outDesc); | 74 GrGLProgramDesc* outDesc); |
73 | 75 |
74 bool hasGeometryProcessor() const { | 76 bool hasGeometryProcessor() const { |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 friend class GrGLProgram; | 272 friend class GrGLProgram; |
271 friend class GrGLProgramBuilder; | 273 friend class GrGLProgramBuilder; |
272 friend class GrGLFullProgramBuilder; | 274 friend class GrGLFullProgramBuilder; |
273 friend class GrGLFragmentOnlyProgramBuilder; | 275 friend class GrGLFragmentOnlyProgramBuilder; |
274 friend class GrGLVertexShaderBuilder; | 276 friend class GrGLVertexShaderBuilder; |
275 friend class GrGLFragmentShaderBuilder; | 277 friend class GrGLFragmentShaderBuilder; |
276 friend class GrGLGeometryShaderBuilder; | 278 friend class GrGLGeometryShaderBuilder; |
277 }; | 279 }; |
278 | 280 |
279 #endif | 281 #endif |
OLD | NEW |