| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrConvexPolyEffect_DEFINED | 8 #ifndef GrConvexPolyEffect_DEFINED |
| 9 #define GrConvexPolyEffect_DEFINED | 9 #define GrConvexPolyEffect_DEFINED |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 virtual ~GrConvexPolyEffect(); | 62 virtual ~GrConvexPolyEffect(); |
| 63 | 63 |
| 64 const char* name() const override { return "ConvexPoly"; } | 64 const char* name() const override { return "ConvexPoly"; } |
| 65 | 65 |
| 66 GrPrimitiveEdgeType getEdgeType() const { return fEdgeType; } | 66 GrPrimitiveEdgeType getEdgeType() const { return fEdgeType; } |
| 67 | 67 |
| 68 int getEdgeCount() const { return fEdgeCount; } | 68 int getEdgeCount() const { return fEdgeCount; } |
| 69 | 69 |
| 70 const SkScalar* getEdges() const { return fEdges; } | 70 const SkScalar* getEdges() const { return fEdges; } |
| 71 | 71 |
| 72 void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const overri
de; | 72 void getGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const over
ride; |
| 73 | 73 |
| 74 GrGLFragmentProcessor* createGLInstance() const override; | 74 GrGLFragmentProcessor* createGLInstance() const override; |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 GrConvexPolyEffect(GrPrimitiveEdgeType edgeType, int n, const SkScalar edges
[]); | 77 GrConvexPolyEffect(GrPrimitiveEdgeType edgeType, int n, const SkScalar edges
[]); |
| 78 | 78 |
| 79 bool onIsEqual(const GrFragmentProcessor& other) const override; | 79 bool onIsEqual(const GrFragmentProcessor& other) const override; |
| 80 | 80 |
| 81 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; | 81 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; |
| 82 | 82 |
| 83 GrPrimitiveEdgeType fEdgeType; | 83 GrPrimitiveEdgeType fEdgeType; |
| 84 int fEdgeCount; | 84 int fEdgeCount; |
| 85 SkScalar fEdges[3 * kMaxEdges]; | 85 SkScalar fEdges[3 * kMaxEdges]; |
| 86 | 86 |
| 87 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 87 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
| 88 | 88 |
| 89 typedef GrFragmentProcessor INHERITED; | 89 typedef GrFragmentProcessor INHERITED; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 | 92 |
| 93 #endif | 93 #endif |
| OLD | NEW |