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 |
11 #include "GrGLPrimitiveProcessor.h" | 11 #include "GrGLPrimitiveProcessor.h" |
12 | 12 |
13 class GrGLGPBuilder; | 13 class GrGLGPBuilder; |
14 | 14 |
15 /** | 15 /** |
16 * If a GL effect needs a GrGLFullShaderBuilder* object to emit vertex code, the
n it must inherit | 16 * If a GL effect needs a GrGLFullShaderBuilder* object to emit vertex code, the
n it must inherit |
17 * from this class. Since paths don't have vertices, this class is only meant to
be used internally | 17 * from this class. Since paths don't have vertices, this class is only meant to
be used internally |
18 * by skia, for special cases. | 18 * by skia, for special cases. |
19 */ | 19 */ |
20 class GrGLGeometryProcessor : public GrGLPrimitiveProcessor { | 20 class GrGLGeometryProcessor : public GrGLPrimitiveProcessor { |
21 public: | 21 public: |
22 /* Any general emit code goes in the base class emitCode. Subclasses overri
de onEmitCode */ | 22 /* Any general emit code goes in the base class emitCode. Subclasses overri
de onEmitCode */ |
23 void emitCode(EmitArgs&) SK_OVERRIDE; | 23 void emitCode(EmitArgs&) override; |
24 | 24 |
25 void setTransformData(const GrPrimitiveProcessor&, | 25 void setTransformData(const GrPrimitiveProcessor&, |
26 const GrGLProgramDataManager&, | 26 const GrGLProgramDataManager&, |
27 int index, | 27 int index, |
28 const SkTArray<const GrCoordTransform*, true>& transfo
rms); | 28 const SkTArray<const GrCoordTransform*, true>& transfo
rms); |
29 | 29 |
30 protected: | 30 protected: |
31 // Many GrGeometryProcessors do not need explicit local coords | 31 // Many GrGeometryProcessors do not need explicit local coords |
32 void emitTransforms(GrGLGPBuilder* gp, | 32 void emitTransforms(GrGLGPBuilder* gp, |
33 const GrShaderVar& posVar, | 33 const GrShaderVar& posVar, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 } | 66 } |
67 } | 67 } |
68 | 68 |
69 private: | 69 private: |
70 virtual void onEmitCode(EmitArgs&, GrGPArgs*) = 0; | 70 virtual void onEmitCode(EmitArgs&, GrGPArgs*) = 0; |
71 | 71 |
72 typedef GrGLPrimitiveProcessor INHERITED; | 72 typedef GrGLPrimitiveProcessor INHERITED; |
73 }; | 73 }; |
74 | 74 |
75 #endif | 75 #endif |
OLD | NEW |