| 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 23 matching lines...) Expand all Loading... |
| 34 kHeaderSize = SkAlign4(sizeof(KeyHeader)), | 34 kHeaderSize = SkAlign4(sizeof(KeyHeader)), |
| 35 // Part 4. | 35 // Part 4. |
| 36 // This is the offset into the backenend specific part of the key, which
includes | 36 // This is the offset into the backenend specific part of the key, which
includes |
| 37 // per-processor keys. | 37 // per-processor keys. |
| 38 kProcessorKeysOffset = kHeaderOffset + kHeaderSize, | 38 kProcessorKeysOffset = kHeaderOffset + kHeaderSize, |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 /** | 41 /** |
| 42 * Builds a GL specific program descriptor | 42 * Builds a GL specific program descriptor |
| 43 * | 43 * |
| 44 * @param GrPrimitiveProcessor The geometry |
| 44 * @param GrOptDrawState The optimized drawstate. The descriptor will repr
esent a program | 45 * @param GrOptDrawState The optimized drawstate. The descriptor will repr
esent a program |
| 45 * which this optstate can use to draw with. The opt
state contains | 46 * which this optstate can use to draw with. The opt
state contains |
| 46 * general draw information, as well as the specific
color, geometry, | 47 * general draw information, as well as the specific
color, geometry, |
| 47 * and coverage stages which will be used to generate
the GL Program for | 48 * and coverage stages which will be used to generate
the GL Program for |
| 48 * this optstate. | 49 * this optstate. |
| 49 * @param DescInfo A descriptor info struct, generated by the optstate, whi
ch contains a number | 50 * @param DescInfo A descriptor info struct, generated by the optstate, whi
ch contains a number |
| 50 * of important facts about the program the built descripto
r will represent | 51 * of important facts about the program the built descripto
r will represent |
| 51 * @param DrawType | 52 * @param DrawType |
| 52 * @param GrGLGpu A GL Gpu, the caps and Gpu object are used to output proc
essor specific | 53 * @param GrGLGpu A GL Gpu, the caps and Gpu object are used to output proc
essor specific |
| 53 * parts of the descriptor. | 54 * parts of the descriptor. |
| 54 * @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 |
| 55 * supported | 56 * supported |
| 56 * @param GrProgramDesc The built and finalized descriptor | 57 * @param GrProgramDesc The built and finalized descriptor |
| 57 **/ | 58 **/ |
| 58 static bool Build(const GrOptDrawState&, | 59 static bool Build(GrProgramDesc*, |
| 60 const GrPrimitiveProcessor&, |
| 61 const GrOptDrawState&, |
| 59 const GrProgramDesc::DescInfo&, | 62 const GrProgramDesc::DescInfo&, |
| 60 GrGpu::DrawType, | 63 GrGpu::DrawType, |
| 61 GrGLGpu*, | 64 const GrGLGpu*, |
| 62 GrProgramDesc*); | 65 const GrBatchTracker&); |
| 63 }; | 66 }; |
| 64 | 67 |
| 65 #endif | 68 #endif |
| OLD | NEW |