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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 static const char* Name() { return "ConvexPoly"; } | 63 static const char* Name() { return "ConvexPoly"; } |
64 | 64 |
65 GrPrimitiveEdgeType getEdgeType() const { return fEdgeType; } | 65 GrPrimitiveEdgeType getEdgeType() const { return fEdgeType; } |
66 | 66 |
67 int getEdgeCount() const { return fEdgeCount; } | 67 int getEdgeCount() const { return fEdgeCount; } |
68 | 68 |
69 const SkScalar* getEdges() const { return fEdges; } | 69 const SkScalar* getEdges() const { return fEdges; } |
70 | 70 |
71 typedef GrGLConvexPolyEffect GLProcessor; | 71 typedef GrGLConvexPolyEffect GLProcessor; |
72 | 72 |
| 73 virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags
) const SK_OVERRIDE; |
| 74 |
73 virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERR
IDE; | 75 virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERR
IDE; |
74 | 76 |
75 private: | 77 private: |
76 GrConvexPolyEffect(GrPrimitiveEdgeType edgeType, int n, const SkScalar edges
[]); | 78 GrConvexPolyEffect(GrPrimitiveEdgeType edgeType, int n, const SkScalar edges
[]); |
77 | 79 |
78 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE; | 80 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE; |
79 | 81 |
80 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR
IDE; | |
81 | |
82 GrPrimitiveEdgeType fEdgeType; | 82 GrPrimitiveEdgeType fEdgeType; |
83 int fEdgeCount; | 83 int fEdgeCount; |
84 SkScalar fEdges[3 * kMaxEdges]; | 84 SkScalar fEdges[3 * kMaxEdges]; |
85 | 85 |
86 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 86 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
87 | 87 |
88 typedef GrFragmentProcessor INHERITED; | 88 typedef GrFragmentProcessor INHERITED; |
89 }; | 89 }; |
90 | 90 |
91 | 91 |
92 #endif | 92 #endif |
OLD | NEW |