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

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

Issue 371103003: Remove GrEffect::CreateEffectRef and GrEffect::AutoEffectRef. (Closed) Base URL: https://skia.googlesource.com/skia.git@no_ref2
Patch Set: Address comments and update for new YUV effect Created 6 years, 5 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
« 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
(...skipping 23 matching lines...) Expand all
34 * 34 *
35 * Currently the edges are specified in device space. In the future we may p refer to specify 35 * Currently the edges are specified in device space. In the future we may p refer to specify
36 * them in src space. There are a number of ways this could be accomplished but we'd probably 36 * them in src space. There are a number of ways this could be accomplished but we'd probably
37 * have to modify the effect/shaderbuilder interface to make it possible (e. g. give access 37 * have to modify the effect/shaderbuilder interface to make it possible (e. g. give access
38 * to the view matrix or untransformed positions in the fragment shader). 38 * to the view matrix or untransformed positions in the fragment shader).
39 */ 39 */
40 static GrEffectRef* Create(GrEffectEdgeType edgeType, int n, const SkScalar edges[]) { 40 static GrEffectRef* Create(GrEffectEdgeType edgeType, int n, const SkScalar edges[]) {
41 if (n <= 0 || n > kMaxEdges || kHairlineAA_GrEffectEdgeType == edgeType) { 41 if (n <= 0 || n > kMaxEdges || kHairlineAA_GrEffectEdgeType == edgeType) {
42 return NULL; 42 return NULL;
43 } 43 }
44 return CreateEffectRef(AutoEffectUnref(SkNEW_ARGS(GrConvexPolyEffect, 44 return SkNEW_ARGS(GrConvexPolyEffect, (edgeType, n, edges));
45 (edgeType, n, edges))) );
46 } 45 }
47 46
48 /** 47 /**
49 * Creates an effect that clips against the path. If the path is not a conve x polygon, is 48 * Creates an effect that clips against the path. If the path is not a conve x polygon, is
50 * inverse filled, or has too many edges, this will return NULL. If offset i s non-NULL, then 49 * inverse filled, or has too many edges, this will return NULL. If offset i s non-NULL, then
51 * the path is translated by the vector. 50 * the path is translated by the vector.
52 */ 51 */
53 static GrEffectRef* Create(GrEffectEdgeType, const SkPath&, const SkVector* offset = NULL); 52 static GrEffectRef* Create(GrEffectEdgeType, const SkPath&, const SkVector* offset = NULL);
54 53
55 /** 54 /**
(...skipping 26 matching lines...) Expand all
82 int fEdgeCount; 81 int fEdgeCount;
83 SkScalar fEdges[3 * kMaxEdges]; 82 SkScalar fEdges[3 * kMaxEdges];
84 83
85 GR_DECLARE_EFFECT_TEST; 84 GR_DECLARE_EFFECT_TEST;
86 85
87 typedef GrEffect INHERITED; 86 typedef GrEffect INHERITED;
88 }; 87 };
89 88
90 89
91 #endif 90 #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