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

Unified Diff: src/gpu/GrClipMaskManager.cpp

Issue 171413004: Analytic rrect clip for cicular corners, radius >= .5 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix windows warning in rrects.cpp 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 | « include/gpu/GrTBackendEffectFactory.h ('k') | src/gpu/effects/GrConvexPolyEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrClipMaskManager.cpp
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 7ccf30f547a8bc85dfc44f84fc1a9dec6cc713eb..b637bd6c7add0bf911618177661a8ed0e1c84337 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -19,6 +19,7 @@
#include "GrSWMaskHelper.h"
#include "effects/GrTextureDomain.h"
#include "effects/GrConvexPolyEffect.h"
+#include "effects/GrRRectEffect.h"
#include "SkRasterClip.h"
#include "SkStrokeRec.h"
#include "SkTLazy.h"
@@ -189,6 +190,9 @@ bool GrClipMaskManager::setupClipping(const GrClipData* clipDataIn,
GrConvexPolyEffect::kFillNoAA_EdgeType;
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(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.
« no previous file with comments | « include/gpu/GrTBackendEffectFactory.h ('k') | src/gpu/effects/GrConvexPolyEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698