| 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 GrGLPathProcessor_DEFINED | 8 #ifndef GrGLPathProcessor_DEFINED |
| 9 #define GrGLPathProcessor_DEFINED | 9 #define GrGLPathProcessor_DEFINED |
| 10 | 10 |
| 11 #include "GrGLPrimitiveProcessor.h" | 11 #include "GrGLPrimitiveProcessor.h" |
| 12 | 12 |
| 13 class GrPathProcessor; | 13 class GrPathProcessor; |
| 14 class GrGLPathRendering; | 14 class GrGLPathRendering; |
| 15 class GrGLGpu; | 15 class GrGLGpu; |
| 16 class GrGLPathProgramDataManager; | |
| 17 | 16 |
| 18 class GrGLPathProcessor : public GrGLPrimitiveProcessor { | 17 class GrGLPathProcessor : public GrGLPrimitiveProcessor { |
| 19 public: | 18 public: |
| 20 GrGLPathProcessor(); | 19 GrGLPathProcessor(); |
| 21 | 20 |
| 22 static void GenKey(const GrPathProcessor&, | 21 static void GenKey(const GrPathProcessor&, |
| 23 const GrGLSLCaps&, | 22 const GrGLSLCaps&, |
| 24 GrProcessorKeyBuilder* b); | 23 GrProcessorKeyBuilder* b); |
| 25 | 24 |
| 26 void emitCode(EmitArgs&) override; | 25 void emitCode(EmitArgs&) override; |
| 27 | 26 |
| 28 void emitTransforms(GrGLGPBuilder*, const TransformsIn&, TransformsOut*); | 27 void emitTransforms(GrGLGPBuilder*, const TransformsIn&, TransformsOut*); |
| 29 | 28 |
| 30 void bindSeparableVaryings(GrGLGpu* gpu, GrGLuint programID); | |
| 31 void resolveSeparableVaryings(GrGLGpu* gpu, GrGLuint programId); | |
| 32 | |
| 33 void setData(const GrGLProgramDataManager&, const GrPrimitiveProcessor&) ove
rride; | 29 void setData(const GrGLProgramDataManager&, const GrPrimitiveProcessor&) ove
rride; |
| 34 | 30 |
| 35 void setTransformData(const GrPrimitiveProcessor&, | 31 void setTransformData(const GrPrimitiveProcessor&, |
| 36 const GrGLPathProgramDataManager&, | 32 const GrGLProgramDataManager&, |
| 37 int index, | 33 int index, |
| 38 const SkTArray<const GrCoordTransform*, true>& transfo
rms); | 34 const SkTArray<const GrCoordTransform*, true>& transfo
rms) override; |
| 39 | |
| 40 virtual void didSetData(GrGLPathRendering*) {} | |
| 41 | 35 |
| 42 private: | 36 private: |
| 43 UniformHandle fColorUniform; | 37 UniformHandle fColorUniform; |
| 44 GrColor fColor; | 38 GrColor fColor; |
| 45 | 39 |
| 46 typedef GrGLPrimitiveProcessor INHERITED; | 40 typedef GrGLPrimitiveProcessor INHERITED; |
| 47 }; | 41 }; |
| 48 | 42 |
| 49 #endif | 43 #endif |
| OLD | NEW |