OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 GrBackendProcessorFactory_DEFINED | 8 #ifndef GrBackendProcessorFactory_DEFINED |
9 #define GrBackendProcessorFactory_DEFINED | 9 #define GrBackendProcessorFactory_DEFINED |
10 | 10 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 } | 108 } |
109 return id; | 109 return id; |
110 } | 110 } |
111 | 111 |
112 const uint32_t fProcessorClassID; | 112 const uint32_t fProcessorClassID; |
113 static int32_t fCurrProcessorClassID; | 113 static int32_t fCurrProcessorClassID; |
114 }; | 114 }; |
115 | 115 |
116 class GrFragmentProcessor; | 116 class GrFragmentProcessor; |
117 class GrGeometryProcessor; | 117 class GrGeometryProcessor; |
| 118 class GrXferProcessor; |
118 class GrGLFragmentProcessor; | 119 class GrGLFragmentProcessor; |
119 class GrGLGeometryProcessor; | 120 class GrGLGeometryProcessor; |
| 121 class GrGLXferProcessor; |
120 | 122 |
121 /** | 123 /** |
122 * Backend processor factory cannot actually create anything, it is up to subcla
sses to implement | 124 * Backend processor factory cannot actually create anything, it is up to subcla
sses to implement |
123 * a create binding which matches Gr to GL in a type safe way | 125 * a create binding which matches Gr to GL in a type safe way |
124 */ | 126 */ |
125 | 127 |
126 class GrBackendFragmentProcessorFactory : public GrBackendProcessorFactory { | 128 class GrBackendFragmentProcessorFactory : public GrBackendProcessorFactory { |
127 public: | 129 public: |
128 /** | 130 /** |
129 * Creates a GrGLProcessor instance that is used both to generate code for t
he GrProcessor in a | 131 * Creates a GrGLProcessor instance that is used both to generate code for t
he GrProcessor in a |
130 * GLSL program and to manage updating uniforms for the program when it is u
sed. | 132 * GLSL program and to manage updating uniforms for the program when it is u
sed. |
131 */ | 133 */ |
132 virtual GrGLFragmentProcessor* createGLInstance(const GrFragmentProcessor&)
const = 0; | 134 virtual GrGLFragmentProcessor* createGLInstance(const GrFragmentProcessor&)
const = 0; |
133 }; | 135 }; |
134 | 136 |
| 137 class GrBackendXferProcessorFactory : public GrBackendProcessorFactory { |
| 138 public: |
| 139 /** |
| 140 * Creates a GrGLProcessor instance that is used both to generate code for t
he GrProcessor in a |
| 141 * GLSL program and to manage updating uniforms for the program when it is u
sed. |
| 142 */ |
| 143 virtual GrGLXferProcessor* createGLInstance(const GrXferProcessor&) const =
0; |
| 144 }; |
| 145 |
135 class GrBackendGeometryProcessorFactory : public GrBackendProcessorFactory { | 146 class GrBackendGeometryProcessorFactory : public GrBackendProcessorFactory { |
136 public: | 147 public: |
137 /** | 148 /** |
138 * Creates a GrGLProcessor instance that is used both to generate code for t
he GrProcessor in a | 149 * Creates a GrGLProcessor instance that is used both to generate code for t
he GrProcessor in a |
139 * GLSL program and to manage updating uniforms for the program when it is u
sed. | 150 * GLSL program and to manage updating uniforms for the program when it is u
sed. |
140 */ | 151 */ |
141 virtual GrGLGeometryProcessor* createGLInstance(const GrGeometryProcessor&)
const = 0; | 152 virtual GrGLGeometryProcessor* createGLInstance(const GrGeometryProcessor&)
const = 0; |
142 }; | 153 }; |
143 | 154 |
144 #endif | 155 #endif |
OLD | NEW |