OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrGLProgramBuilder_DEFINED | 8 #ifndef GrGLProgramBuilder_DEFINED |
9 #define GrGLProgramBuilder_DEFINED | 9 #define GrGLProgramBuilder_DEFINED |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 GrGLGpu* gpu() const { return fGpu; } | 41 GrGLGpu* gpu() const { return fGpu; } |
42 | 42 |
43 private: | 43 private: |
44 GrGLProgramBuilder(GrGLGpu*, const GrPipeline&, const GrPrimitiveProcessor&, | 44 GrGLProgramBuilder(GrGLGpu*, const GrPipeline&, const GrPrimitiveProcessor&, |
45 const GrGLProgramDesc&); | 45 const GrGLProgramDesc&); |
46 | 46 |
47 bool compileAndAttachShaders(GrGLSLShaderBuilder& shader, | 47 bool compileAndAttachShaders(GrGLSLShaderBuilder& shader, |
48 GrGLuint programId, | 48 GrGLuint programId, |
49 GrGLenum type, | 49 GrGLenum type, |
50 SkTDArray<GrGLuint>* shaderIds); | 50 SkTDArray<GrGLuint>* shaderIds); |
51 GrGLProgram* finalize(); | 51 GrGLProgram* finalize(); |
52 void bindProgramResourceLocations(GrGLuint programID); | 52 void bindProgramResourceLocations(GrGLuint programID); |
53 bool checkLinkStatus(GrGLuint programID); | 53 bool checkLinkStatus(GrGLuint programID); |
54 void resolveProgramResourceLocations(GrGLuint programID); | 54 void resolveProgramResourceLocations(GrGLuint programID); |
55 void cleanupProgram(GrGLuint programID, const SkTDArray<GrGLuint>& shaderIDs
); | 55 void cleanupProgram(GrGLuint programID, const SkTDArray<GrGLuint>& shaderIDs
); |
56 void cleanupShaders(const SkTDArray<GrGLuint>& shaderIDs); | 56 void cleanupShaders(const SkTDArray<GrGLuint>& shaderIDs); |
57 | 57 |
58 // Subclasses create different programs | 58 // Subclasses create different programs |
59 GrGLProgram* createProgram(GrGLuint programID); | 59 GrGLProgram* createProgram(GrGLuint programID); |
60 | 60 |
61 GrGLSLUniformHandler* uniformHandler() override { return &fUniformHandler; } | 61 GrGLSLUniformHandler* uniformHandler() override { return &fUniformHandler; } |
62 const GrGLSLUniformHandler* uniformHandler() const override { return &fUnifo
rmHandler; } | 62 const GrGLSLUniformHandler* uniformHandler() const override { return &fUnifo
rmHandler; } |
63 GrGLSLVaryingHandler* varyingHandler() override { return &fVaryingHandler; } | 63 GrGLSLVaryingHandler* varyingHandler() override { return &fVaryingHandler; } |
64 | 64 |
65 | 65 |
66 GrGLGpu* fGpu; | 66 GrGLGpu* fGpu; |
67 GrGLVaryingHandler fVaryingHandler; | 67 GrGLVaryingHandler fVaryingHandler; |
68 GrGLUniformHandler fUniformHandler; | 68 GrGLUniformHandler fUniformHandler; |
69 | 69 |
70 typedef GrGLSLProgramBuilder INHERITED; | 70 typedef GrGLSLProgramBuilder INHERITED; |
71 }; | 71 }; |
72 #endif | 72 #endif |
OLD | NEW |