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

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

Issue 778453002: Remove backend factories (Closed) Base URL: https://skia.googlesource.com/skia.git@unichoice
Patch Set: more clang warnings Created 6 years 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
« no previous file with comments | « src/gpu/effects/GrConfigConversionEffect.cpp ('k') | src/gpu/effects/GrConvexPolyEffect.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 #include "GrDrawTargetCaps.h" 11 #include "GrDrawTargetCaps.h"
12 #include "GrFragmentProcessor.h"
12 #include "GrProcessor.h" 13 #include "GrProcessor.h"
13 #include "GrTypesPriv.h" 14 #include "GrTypesPriv.h"
14 15
15 class GrGLConvexPolyEffect;
16 class GrInvariantOutput; 16 class GrInvariantOutput;
17 class SkPath; 17 class SkPath;
18 18
19 /** 19 /**
20 * An effect that renders a convex polygon. It is intended to be used as a cover age effect. 20 * An effect that renders a convex polygon. It is intended to be used as a cover age effect.
21 * Bounding geometry is rendered and the effect computes coverage based on the f ragment's 21 * Bounding geometry is rendered and the effect computes coverage based on the f ragment's
22 * position relative to the polygon. 22 * position relative to the polygon.
23 */ 23 */
24 class GrConvexPolyEffect : public GrFragmentProcessor { 24 class GrConvexPolyEffect : public GrFragmentProcessor {
25 public: 25 public:
(...skipping 28 matching lines...) Expand all
54 static GrFragmentProcessor* Create(GrPrimitiveEdgeType, const SkPath&, 54 static GrFragmentProcessor* Create(GrPrimitiveEdgeType, const SkPath&,
55 const SkVector* offset = NULL); 55 const SkVector* offset = NULL);
56 56
57 /** 57 /**
58 * Creates an effect that fills inside the rect with AA edges.. 58 * Creates an effect that fills inside the rect with AA edges..
59 */ 59 */
60 static GrFragmentProcessor* Create(GrPrimitiveEdgeType, const SkRect&); 60 static GrFragmentProcessor* Create(GrPrimitiveEdgeType, const SkRect&);
61 61
62 virtual ~GrConvexPolyEffect(); 62 virtual ~GrConvexPolyEffect();
63 63
64 static const char* Name() { return "ConvexPoly"; } 64 virtual const char* name() const SK_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 typedef GrGLConvexPolyEffect GLProcessor; 72 virtual void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) cons t SK_OVERRIDE;
73 73
74 virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERR IDE; 74 virtual GrGLFragmentProcessor* createGLInstance() const SK_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 virtual bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE; 79 virtual bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE;
80 80
81 virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVE RRIDE; 81 virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVE RRIDE;
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
OLDNEW
« no previous file with comments | « src/gpu/effects/GrConfigConversionEffect.cpp ('k') | src/gpu/effects/GrConvexPolyEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698