| 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 GrGLGeometryProcessor_DEFINED | 8 #ifndef GrGLGeometryProcessor_DEFINED |
| 9 #define GrGLGeometryProcessor_DEFINED | 9 #define GrGLGeometryProcessor_DEFINED |
| 10 | 10 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 /** | 130 /** |
| 131 * If a GL effect needs a GrGLFullShaderBuilder* object to emit vertex code, the
n it must inherit | 131 * If a GL effect needs a GrGLFullShaderBuilder* object to emit vertex code, the
n it must inherit |
| 132 * from this class. Since paths don't have vertices, this class is only meant to
be used internally | 132 * from this class. Since paths don't have vertices, this class is only meant to
be used internally |
| 133 * by skia, for special cases. | 133 * by skia, for special cases. |
| 134 */ | 134 */ |
| 135 class GrGLGeometryProcessor : public GrGLPrimitiveProcessor { | 135 class GrGLGeometryProcessor : public GrGLPrimitiveProcessor { |
| 136 public: | 136 public: |
| 137 /* Any general emit code goes in the base class emitCode. Subclasses overri
de onEmitCode */ | 137 /* Any general emit code goes in the base class emitCode. Subclasses overri
de onEmitCode */ |
| 138 void emitCode(EmitArgs&) SK_OVERRIDE; | 138 void emitCode(EmitArgs&) SK_OVERRIDE; |
| 139 | 139 |
| 140 void setTransformData(const GrPrimitiveProcessor*, | 140 void setTransformData(const GrPrimitiveProcessor&, |
| 141 const GrGLProgramDataManager&, | 141 const GrGLProgramDataManager&, |
| 142 int index, | 142 int index, |
| 143 const SkTArray<const GrCoordTransform*, true>& transfo
rms); | 143 const SkTArray<const GrCoordTransform*, true>& transfo
rms); |
| 144 | 144 |
| 145 protected: | 145 protected: |
| 146 const char* position() const { return "pos3"; } | 146 const char* position() const { return "pos3"; } |
| 147 | 147 |
| 148 // Many GrGeometryProcessors do not need explicit local coords | 148 // Many GrGeometryProcessors do not need explicit local coords |
| 149 void emitTransforms(GrGLGPBuilder* gp, | 149 void emitTransforms(GrGLGPBuilder* gp, |
| 150 const char* position, | 150 const char* position, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 181 void emitCode(EmitArgs&) SK_OVERRIDE; | 181 void emitCode(EmitArgs&) SK_OVERRIDE; |
| 182 | 182 |
| 183 virtual void emitTransforms(GrGLGPBuilder*, const TransformsIn&, TransformsO
ut*) = 0; | 183 virtual void emitTransforms(GrGLGPBuilder*, const TransformsIn&, TransformsO
ut*) = 0; |
| 184 | 184 |
| 185 virtual void resolveSeparableVaryings(GrGLGpu* gpu, GrGLuint programId) {} | 185 virtual void resolveSeparableVaryings(GrGLGpu* gpu, GrGLuint programId) {} |
| 186 | 186 |
| 187 void setData(const GrGLProgramDataManager&, | 187 void setData(const GrGLProgramDataManager&, |
| 188 const GrPrimitiveProcessor&, | 188 const GrPrimitiveProcessor&, |
| 189 const GrBatchTracker&) SK_OVERRIDE; | 189 const GrBatchTracker&) SK_OVERRIDE; |
| 190 | 190 |
| 191 virtual void setTransformData(const GrPrimitiveProcessor*, | 191 virtual void setTransformData(const GrPrimitiveProcessor&, |
| 192 int index, | 192 int index, |
| 193 const SkTArray<const GrCoordTransform*, true>&
transforms, | 193 const SkTArray<const GrCoordTransform*, true>&
transforms, |
| 194 GrGLPathRendering*, | 194 GrGLPathRendering*, |
| 195 GrGLuint programID) = 0; | 195 GrGLuint programID) = 0; |
| 196 | 196 |
| 197 virtual void didSetData(GrGLPathRendering*) {} | 197 virtual void didSetData(GrGLPathRendering*) {} |
| 198 | 198 |
| 199 private: | 199 private: |
| 200 UniformHandle fColorUniform; | 200 UniformHandle fColorUniform; |
| 201 GrColor fColor; | 201 GrColor fColor; |
| 202 | 202 |
| 203 typedef GrGLPrimitiveProcessor INHERITED; | 203 typedef GrGLPrimitiveProcessor INHERITED; |
| 204 }; | 204 }; |
| 205 | 205 |
| 206 #endif | 206 #endif |
| OLD | NEW |