aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-03 20:09:56 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-03 20:09:56 +0000
commitd3066bd9b4a37cf4a39e7df7e1432f3df10dbc67 (patch)
treee12a6a5c91ac66fbc9768891de77527661cc1880 /src/gpu
parent2859f9fbf3764d401b3b9b27f3d9e9bddeaf3a14 (diff)
Revert of Use GrConvexPolyEffect when clip is a single convex polygon (https://codereview.chromium.org/151523005/)
Reason for revert: unit tests crashing on windows? Original issue's description: > Use GrConvexPolyEffect when clip is a single convex polygon > > BUG=skia:2051 > > Committed: http://code.google.com/p/skia/source/detail?r=13286 TBR=robertphillips@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2051 Review URL: https://codereview.chromium.org/142443006 git-svn-id: http://skia.googlecode.com/svn/trunk@13288 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrClipMaskManager.cpp29
1 files changed, 2 insertions, 27 deletions
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 340ede0d31..4fd746f3fa 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -18,7 +18,6 @@
#include "GrStencilBuffer.h"
#include "GrSWMaskHelper.h"
#include "effects/GrTextureDomain.h"
-#include "effects/GrConvexPolyEffect.h"
#include "SkRasterClip.h"
#include "SkStrokeRec.h"
#include "SkTLazy.h"
@@ -154,33 +153,9 @@ bool GrClipMaskManager::setupClipping(const GrClipData* clipDataIn,
return true;
}
- // If there is only one clip element and it is a convex polygon we just install an effect that
- // clips against the edges.
- if (1 == elements.count() && SkClipStack::Element::kPath_Type == elements.tail()->getType() &&
- SkRegion::kReplace_Op == elements.tail()->getOp()) {
- const SkPath& p = elements.tail()->getPath();
- bool isAA = GR_AA_CLIP && elements.tail()->isAA();
- SkAutoTUnref<GrEffectRef> effect;
- if (rt->isMultisampled()) {
- // A coverage effect for AA clipping won't play nicely with MSAA.
- if (!isAA) {
- effect.reset(GrConvexPolyEffect::Create(GrConvexPolyEffect::kFillNoAA_EdgeType, p));
- }
- } else {
- GrConvexPolyEffect::EdgeType type = isAA ? GrConvexPolyEffect::kFillAA_EdgeType :
- GrConvexPolyEffect::kFillNoAA_EdgeType;
- effect.reset(GrConvexPolyEffect::Create(type, p));
- }
- if (effect) {
- are->set(fGpu->drawState());
- fGpu->drawState()->addCoverageEffect(effect);
- fGpu->disableScissor();
- this->setGpuStencil();
- return true;
- }
- }
-
#if GR_AA_CLIP
+ // TODO: catch isRect && requiresAA and use clip planes if available rather than a mask.
+
// If MSAA is enabled we can do everything in the stencil buffer.
if (0 == rt->numSamples() && requiresAA) {
GrTexture* result = NULL;