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

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

Issue 12462008: Add GrEllipseEdgeEffect (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: rebase again Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrTextContext.cpp ('k') | src/gpu/effects/GrEllipseEdgeEffect.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2013 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef GrEllipseEdgeEffect_DEFINED
9 #define GrEllipseEdgeEffect_DEFINED
10
11 #include "GrEffect.h"
12
13 class GrGLEllipseEdgeEffect;
14
15 /**
16 * The output of this effect is a modulation of the input color and coverage for an axis-aligned
17 * ellipse, specified as center_x, center_y, x_radius, x_radius/y_radius in wind ow space (y-down).
18 */
19
20 class GrEllipseEdgeEffect : public GrEffect {
21 public:
22 static GrEffectRef* Create() {
23 // maybe only have one static copy?
24 AutoEffectUnref effect(SkNEW(GrEllipseEdgeEffect));
25 return CreateEffectRef(effect);
26 }
27
28 virtual ~GrEllipseEdgeEffect() {}
29
30 static const char* Name() { return "EllipseEdge"; }
31
32 virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags ) const SK_OVERRIDE;
33
34 typedef GrGLEllipseEdgeEffect GLEffect;
35
36 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE;
37
38 private:
39 GrEllipseEdgeEffect();
40
41 virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE {
42 return true;
43 }
44
45 GR_DECLARE_EFFECT_TEST;
46
47 typedef GrEffect INHERITED;
48 };
49
50 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrTextContext.cpp ('k') | src/gpu/effects/GrEllipseEdgeEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698