Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Side by Side Diff: src/gpu/effects/GrConvexPolyEffect.h

Issue 608253002: Add isSingleComponent bool to getConstantColorComponent (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
75 virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERR IDE; 73 virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERR IDE;
76 74
77 private: 75 private:
78 GrConvexPolyEffect(GrPrimitiveEdgeType edgeType, int n, const SkScalar edges []); 76 GrConvexPolyEffect(GrPrimitiveEdgeType edgeType, int n, const SkScalar edges []);
79 77
80 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE; 78 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE;
81 79
80 virtual void onGetConstantColorComponents(GrColor* color, uint32_t* validFla gs,
81 bool* isSingleComponent) const SK_ OVERRIDE;
82
82 GrPrimitiveEdgeType fEdgeType; 83 GrPrimitiveEdgeType fEdgeType;
83 int fEdgeCount; 84 int fEdgeCount;
84 SkScalar fEdges[3 * kMaxEdges]; 85 SkScalar fEdges[3 * kMaxEdges];
85 86
86 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 87 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
87 88
88 typedef GrFragmentProcessor INHERITED; 89 typedef GrFragmentProcessor INHERITED;
89 }; 90 };
90 91
91 92
92 #endif 93 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698