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

Unified Diff: gm/convexpolyeffect.cpp

Issue 183893023: Unify edge type enums across GrEffect subclasses that clip rendering to a geometry. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: tot again 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/beziereffects.cpp ('k') | gm/rrects.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/convexpolyeffect.cpp
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp
index 9142ca9cbd135811869915cd202b400ba11854ed..ac8ec72d0895c2488108c5a7c4fbe73606a616d8 100644
--- a/gm/convexpolyeffect.cpp
+++ b/gm/convexpolyeffect.cpp
@@ -120,7 +120,7 @@ protected:
const SkPath* path = iter.get();
SkScalar x = 0;
- for (int et = 0; et < GrConvexPolyEffect::kEdgeTypeCnt; ++et) {
+ for (int et = 0; et < kGrEffectEdgeTypeCnt; ++et) {
GrTestTarget tt;
context->getTestTarget(&tt);
if (NULL == tt.target()) {
@@ -135,11 +135,10 @@ protected:
m.setTranslate(x, y);
path->transform(m, &p);
- GrConvexPolyEffect::EdgeType edgeType = (GrConvexPolyEffect::EdgeType) et;
+ GrEffectEdgeType edgeType = (GrEffectEdgeType) et;
SkAutoTUnref<GrEffectRef> effect(GrConvexPolyEffect::Create(edgeType, p));
if (!effect) {
- SkDEBUGFAIL("Couldn't create convex poly effect.");
- return;
+ continue;
}
drawState->addCoverageEffect(effect, 1);
drawState->setIdentityViewMatrix();
@@ -179,7 +178,7 @@ protected:
SkScalar x = 0;
- for (int et = 0; et < GrConvexPolyEffect::kEdgeTypeCnt; ++et) {
+ for (int et = 0; et < kGrEffectEdgeTypeCnt; ++et) {
GrTestTarget tt;
context->getTestTarget(&tt);
if (NULL == tt.target()) {
@@ -188,11 +187,10 @@ protected:
}
SkRect rect = *iter.get();
rect.offset(x, y);
- GrConvexPolyEffect::EdgeType edgeType = (GrConvexPolyEffect::EdgeType) et;
+ GrEffectEdgeType edgeType = (GrEffectEdgeType) et;
SkAutoTUnref<GrEffectRef> effect(GrConvexPolyEffect::Create(edgeType, rect));
if (!effect) {
- SkDEBUGFAIL("Couldn't create convex poly effect.");
- return;
+ continue;
}
GrDrawState* drawState = tt.target()->drawState();
« no previous file with comments | « gm/beziereffects.cpp ('k') | gm/rrects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698