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 |
| 11 #include "GrPipeline.h" |
| 12 #include "gl/GrGLPrimitiveProcessor.h" |
11 #include "gl/GrGLProgramDataManager.h" | 13 #include "gl/GrGLProgramDataManager.h" |
12 #include "glsl/GrGLSLProgramBuilder.h" | 14 #include "glsl/GrGLSLProgramBuilder.h" |
13 #include "glsl/GrGLSLProgramDataManager.h" | 15 #include "glsl/GrGLSLProgramDataManager.h" |
14 #include "glsl/GrGLSLTextureSampler.h" | 16 #include "glsl/GrGLSLTextureSampler.h" |
15 #include "../GrGLPrimitiveProcessor.h" | 17 #include "glsl/GrGLSLXferProcessor.h" |
16 #include "../GrGLXferProcessor.h" | |
17 #include "../../GrPipeline.h" | |
18 | 18 |
19 class GrFragmentProcessor; | 19 class GrFragmentProcessor; |
20 class GrGLContextInfo; | 20 class GrGLContextInfo; |
21 class GrGLSLShaderBuilder; | 21 class GrGLSLShaderBuilder; |
22 class GrGLSLCaps; | 22 class GrGLSLCaps; |
23 | 23 |
24 /** | 24 /** |
25 * The below struct represent processors installed in programs. | 25 * The below struct represent processors installed in programs. |
26 */ | 26 */ |
27 template <class Proc> | 27 template <class Proc> |
28 struct GrGLInstalledProc { | 28 struct GrGLInstalledProc { |
29 SkDEBUGCODE(int fSamplersIdx;) | 29 SkDEBUGCODE(int fSamplersIdx;) |
30 SkAutoTDelete<Proc> fGLProc; | 30 SkAutoTDelete<Proc> fGLProc; |
31 }; | 31 }; |
32 | 32 |
33 typedef GrGLInstalledProc<GrGLPrimitiveProcessor> GrGLInstalledGeoProc; | 33 typedef GrGLInstalledProc<GrGLPrimitiveProcessor> GrGLInstalledGeoProc; |
34 typedef GrGLInstalledProc<GrGLXferProcessor> GrGLInstalledXferProc; | 34 typedef GrGLInstalledProc<GrGLSLXferProcessor> GrGLInstalledXferProc; |
35 typedef GrGLInstalledProc<GrGLSLFragmentProcessor> GrGLInstalledFragProc; | 35 typedef GrGLInstalledProc<GrGLSLFragmentProcessor> GrGLInstalledFragProc; |
36 | 36 |
37 struct GrGLInstalledFragProcs : public SkRefCnt { | 37 struct GrGLInstalledFragProcs : public SkRefCnt { |
38 virtual ~GrGLInstalledFragProcs(); | 38 virtual ~GrGLInstalledFragProcs(); |
39 SkSTArray<8, GrGLInstalledFragProc*, true> fProcs; | 39 SkSTArray<8, GrGLInstalledFragProc*, true> fProcs; |
40 }; | 40 }; |
41 | 41 |
42 /* | 42 /* |
43 * Please note - no diamond problems because of virtual inheritance. Also, both
base classes | 43 * Please note - no diamond problems because of virtual inheritance. Also, both
base classes |
44 * are pure virtual with no data members. This is the base class for program bu
ilding. | 44 * are pure virtual with no data members. This is the base class for program bu
ilding. |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 SeparableVaryingInfoArray fSeparableVaryingInfos; | 182 SeparableVaryingInfoArray fSeparableVaryingInfos; |
183 | 183 |
184 friend class GrGLSLShaderBuilder; | 184 friend class GrGLSLShaderBuilder; |
185 friend class GrGLSLVertexBuilder; | 185 friend class GrGLSLVertexBuilder; |
186 friend class GrGLSLFragmentShaderBuilder; | 186 friend class GrGLSLFragmentShaderBuilder; |
187 friend class GrGLSLGeometryBuilder; | 187 friend class GrGLSLGeometryBuilder; |
188 | 188 |
189 typedef GrGLSLProgramBuilder INHERITED; | 189 typedef GrGLSLProgramBuilder INHERITED; |
190 }; | 190 }; |
191 #endif | 191 #endif |
OLD | NEW |