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