diff options
author | 2014-03-05 18:27:43 +0000 | |
---|---|---|
committer | 2014-03-05 18:27:43 +0000 | |
commit | cabf4b2f3664b98c1084fbb94a999af15ddfb52d (patch) | |
tree | 6458dbcdcb2fee1cc626923dafcff021d0b855be /src/gpu/GrClipMaskManager.cpp | |
parent | dcb8e54ffdc9194744c0ec839969102bd0f582c6 (diff) |
Unify edge type enums across GrEffect subclasses that clip rendering to a geometry.
BUG=skia:
R=egdaniel@google.com, robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/183893023
git-svn-id: http://skia.googlecode.com/svn/trunk@13674 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrClipMaskManager.cpp')
-rw-r--r-- | src/gpu/GrClipMaskManager.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp index 9b95d33c5a..e24c759688 100644 --- a/src/gpu/GrClipMaskManager.cpp +++ b/src/gpu/GrClipMaskManager.cpp @@ -180,19 +180,18 @@ bool GrClipMaskManager::setupClipping(const GrClipData* clipDataIn, if (!isAA) { SkVector offset = { SkIntToScalar(-clipDataIn->fOrigin.fX), SkIntToScalar(-clipDataIn->fOrigin.fY) }; - effect.reset(GrConvexPolyEffect::Create(GrConvexPolyEffect::kFillNoAA_EdgeType, + effect.reset(GrConvexPolyEffect::Create(kFillBW_GrEffectEdgeType, path, &offset)); } } else { SkVector offset = { SkIntToScalar(-clipDataIn->fOrigin.fX), SkIntToScalar(-clipDataIn->fOrigin.fY) }; - GrConvexPolyEffect::EdgeType type = isAA ? GrConvexPolyEffect::kFillAA_EdgeType : - GrConvexPolyEffect::kFillNoAA_EdgeType; + GrEffectEdgeType type = isAA ? kFillAA_GrEffectEdgeType : kFillBW_GrEffectEdgeType; effect.reset(GrConvexPolyEffect::Create(type, path, &offset)); } } else if (isAA && SkClipStack::Element::kRRect_Type == type && !rt->isMultisampled()) { const SkRRect& rrect = elements.tail()->getRRect(); - effect.reset(GrRRectEffect::Create(GrRRectEffect::kFillAA_EdgeType, rrect)); + effect.reset(GrRRectEffect::Create(kFillAA_GrEffectEdgeType, rrect)); } else if (isAA && SkClipStack::Element::kRect_Type == type && !rt->isMultisampled()) { // We only handle AA/non-MSAA rects here. Coverage effect AA isn't MSAA friendly and // non-AA rect clips are handled by the scissor. @@ -200,7 +199,7 @@ bool GrClipMaskManager::setupClipping(const GrClipData* clipDataIn, SkVector offset = { SkIntToScalar(-clipDataIn->fOrigin.fX), SkIntToScalar(-clipDataIn->fOrigin.fY) }; rect.offset(offset); - effect.reset(GrConvexPolyEffect::Create(GrConvexPolyEffect::kFillAA_EdgeType, rect)); + effect.reset(GrConvexPolyEffect::Create(kFillAA_GrEffectEdgeType, rect)); // This should never fail. SkASSERT(effect); } |