| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 /** | 44 /** |
| 45 * Builds a GL specific program descriptor | 45 * Builds a GL specific program descriptor |
| 46 * | 46 * |
| 47 * @param GrOptDrawState The optimized drawstate. The descriptor will repr
esent a program | 47 * @param GrOptDrawState The optimized drawstate. The descriptor will repr
esent a program |
| 48 * which this optstate can use to draw with. The opt
state contains | 48 * which this optstate can use to draw with. The opt
state contains |
| 49 * general draw information, as well as the specific
color, geometry, | 49 * general draw information, as well as the specific
color, geometry, |
| 50 * and coverage stages which will be used to generate
the GL Program for | 50 * and coverage stages which will be used to generate
the GL Program for |
| 51 * this optstate. | 51 * this optstate. |
| 52 * @param DescInfo A descriptor info struct, generated by the optstate, whi
ch contains a number | |
| 53 * of important facts about the program the built descripto
r will represent | |
| 54 * @param DrawType | 52 * @param DrawType |
| 55 * @param GrGpuGL A GL Gpu, the caps and Gpu object are used to output proc
essor specific | 53 * @param GrGpuGL A GL Gpu, the caps and Gpu object are used to output proc
essor specific |
| 56 * parts of the descriptor. | 54 * parts of the descriptor. |
| 57 * @param GrDeviceCoordTexture A dstCopy texture, which may be null if fram
e buffer fetch is | 55 * @param GrDeviceCoordTexture A dstCopy texture, which may be null if fram
e buffer fetch is |
| 58 * supported | 56 * supported |
| 59 * @param GrProgramDesc The built and finalized descriptor | 57 * @param GrProgramDesc The built and finalized descriptor |
| 60 **/ | 58 **/ |
| 61 static bool Build(const GrOptDrawState&, | 59 static bool Build(const GrOptDrawState&, |
| 62 const GrProgramDesc::DescInfo&, | |
| 63 GrGpu::DrawType, | 60 GrGpu::DrawType, |
| 64 GrGpuGL*, | 61 GrGpuGL*, |
| 65 GrProgramDesc*); | 62 GrProgramDesc*); |
| 66 | 63 |
| 67 static const GLKeyHeader& GetHeader(const GrProgramDesc& desc) { | 64 static const GLKeyHeader& GetHeader(const GrProgramDesc& desc) { |
| 68 return *desc.atOffset<GLKeyHeader, kHeaderOffset>(); | 65 return *desc.atOffset<GLKeyHeader, kHeaderOffset>(); |
| 69 } | 66 } |
| 70 }; | 67 }; |
| 71 | 68 |
| 72 #endif | 69 #endif |
| OLD | NEW |