| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 /** | 131 /** |
| 132 * If a GL effect needs a GrGLFullShaderBuilder* object to emit vertex code, the
n it must inherit | 132 * If a GL effect needs a GrGLFullShaderBuilder* object to emit vertex code, the
n it must inherit |
| 133 * from this class. Since paths don't have vertices, this class is only meant to
be used internally | 133 * from this class. Since paths don't have vertices, this class is only meant to
be used internally |
| 134 * by skia, for special cases. | 134 * by skia, for special cases. |
| 135 */ | 135 */ |
| 136 class GrGLGeometryProcessor : public GrGLPrimitiveProcessor { | 136 class GrGLGeometryProcessor : public GrGLPrimitiveProcessor { |
| 137 public: | 137 public: |
| 138 /* Any general emit code goes in the base class emitCode. Subclasses overri
de onEmitCode */ | 138 /* Any general emit code goes in the base class emitCode. Subclasses overri
de onEmitCode */ |
| 139 void emitCode(EmitArgs&) SK_OVERRIDE; | 139 void emitCode(EmitArgs&) SK_OVERRIDE; |
| 140 | 140 |
| 141 void setTransformData(const GrPrimitiveProcessor*, | 141 void setTransformData(const GrPrimitiveProcessor&, |
| 142 const GrGLProgramDataManager&, | 142 const GrGLProgramDataManager&, |
| 143 int index, | 143 int index, |
| 144 const SkTArray<const GrCoordTransform*, true>& transfo
rms); | 144 const SkTArray<const GrCoordTransform*, true>& transfo
rms); |
| 145 | 145 |
| 146 protected: | 146 protected: |
| 147 // Many GrGeometryProcessors do not need explicit local coords | 147 // Many GrGeometryProcessors do not need explicit local coords |
| 148 void emitTransforms(GrGLGPBuilder* gp, | 148 void emitTransforms(GrGLGPBuilder* gp, |
| 149 const GrShaderVar& posVar, | 149 const GrShaderVar& posVar, |
| 150 const SkMatrix& localMatrix, | 150 const SkMatrix& localMatrix, |
| 151 const TransformsIn& tin, | 151 const TransformsIn& tin, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 void emitCode(EmitArgs&) SK_OVERRIDE; | 203 void emitCode(EmitArgs&) SK_OVERRIDE; |
| 204 | 204 |
| 205 virtual void emitTransforms(GrGLGPBuilder*, const TransformsIn&, TransformsO
ut*) = 0; | 205 virtual void emitTransforms(GrGLGPBuilder*, const TransformsIn&, TransformsO
ut*) = 0; |
| 206 | 206 |
| 207 virtual void resolveSeparableVaryings(GrGLGpu* gpu, GrGLuint programId) {} | 207 virtual void resolveSeparableVaryings(GrGLGpu* gpu, GrGLuint programId) {} |
| 208 | 208 |
| 209 void setData(const GrGLProgramDataManager&, | 209 void setData(const GrGLProgramDataManager&, |
| 210 const GrPrimitiveProcessor&, | 210 const GrPrimitiveProcessor&, |
| 211 const GrBatchTracker&) SK_OVERRIDE; | 211 const GrBatchTracker&) SK_OVERRIDE; |
| 212 | 212 |
| 213 virtual void setTransformData(const GrPrimitiveProcessor*, | 213 virtual void setTransformData(const GrPrimitiveProcessor&, |
| 214 int index, | 214 int index, |
| 215 const SkTArray<const GrCoordTransform*, true>&
transforms, | 215 const SkTArray<const GrCoordTransform*, true>&
transforms, |
| 216 GrGLPathRendering*, | 216 GrGLPathRendering*, |
| 217 GrGLuint programID) = 0; | 217 GrGLuint programID) = 0; |
| 218 | 218 |
| 219 virtual void didSetData(GrGLPathRendering*) {} | 219 virtual void didSetData(GrGLPathRendering*) {} |
| 220 | 220 |
| 221 private: | 221 private: |
| 222 UniformHandle fColorUniform; | 222 UniformHandle fColorUniform; |
| 223 GrColor fColor; | 223 GrColor fColor; |
| 224 | 224 |
| 225 typedef GrGLPrimitiveProcessor INHERITED; | 225 typedef GrGLPrimitiveProcessor INHERITED; |
| 226 }; | 226 }; |
| 227 | 227 |
| 228 #endif | 228 #endif |
| OLD | NEW |