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

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

Issue 140093004: Specialize GrConvexPolyEffect for AA rects, use for AA clip rects. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: whitespace Created 6 years, 10 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
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 return CreateEffectRef(AutoEffectUnref(SkNEW_ARGS(GrConvexPolyEffect, 54 return CreateEffectRef(AutoEffectUnref(SkNEW_ARGS(GrConvexPolyEffect,
55 (edgeType, n, edges))) ); 55 (edgeType, n, edges))) );
56 } 56 }
57 57
58 /** 58 /**
59 * Creates an effect that clips against the path. If the path is not a conve x polygon, is 59 * Creates an effect that clips against the path. If the path is not a conve x polygon, is
60 * inverse filled, or has too many edges, this will return NULL. 60 * inverse filled, or has too many edges, this will return NULL.
61 */ 61 */
62 static GrEffectRef* Create(EdgeType, const SkPath&); 62 static GrEffectRef* Create(EdgeType, const SkPath&);
63 63
64 /**
65 * Creates an effect that clips against the rect.
66 */
67 static GrEffectRef* Create(EdgeType, const SkRect&);
68
64 virtual ~GrConvexPolyEffect(); 69 virtual ~GrConvexPolyEffect();
65 70
66 static const char* Name() { return "ConvexPoly"; } 71 static const char* Name() { return "ConvexPoly"; }
67 72
68 EdgeType getEdgeType() const { return fEdgeType; } 73 EdgeType getEdgeType() const { return fEdgeType; }
69 74
70 int getEdgeCount() const { return fEdgeCount; } 75 int getEdgeCount() const { return fEdgeCount; }
71 76
72 const SkScalar* getEdges() const { return fEdges; } 77 const SkScalar* getEdges() const { return fEdges; }
73 78
(...skipping 12 matching lines...) Expand all
86 int fEdgeCount; 91 int fEdgeCount;
87 SkScalar fEdges[3 * kMaxEdges]; 92 SkScalar fEdges[3 * kMaxEdges];
88 93
89 GR_DECLARE_EFFECT_TEST; 94 GR_DECLARE_EFFECT_TEST;
90 95
91 typedef GrEffect INHERITED; 96 typedef GrEffect INHERITED;
92 }; 97 };
93 98
94 99
95 #endif 100 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698