Remove unnecessary isrect code in clip mask manager
R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/205213002 git-svn-id: http://skia.googlecode.com/svn/trunk@13911 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
175eaf62fa
commit
ca2b441e3f
@ -220,7 +220,6 @@ bool GrClipMaskManager::setupClipping(const GrClipData* clipDataIn,
|
||||
InitialState initialState;
|
||||
SkIRect clipSpaceIBounds;
|
||||
bool requiresAA;
|
||||
bool isRect = false;
|
||||
|
||||
GrDrawState* drawState = fGpu->drawState();
|
||||
|
||||
@ -243,7 +242,6 @@ bool GrClipMaskManager::setupClipping(const GrClipData* clipDataIn,
|
||||
if (elements.isEmpty()) {
|
||||
if (kAllIn_InitialState == initialState) {
|
||||
ignoreClip = clipSpaceIBounds == clipSpaceRTIBounds;
|
||||
isRect = true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@ -323,16 +321,6 @@ bool GrClipMaskManager::setupClipping(const GrClipData* clipDataIn,
|
||||
// "incorrectly" clearing the AA cache.
|
||||
fAACache.reset();
|
||||
|
||||
// If the clip is a rectangle then just set the scissor. Otherwise, create
|
||||
// a stencil mask.
|
||||
if (isRect) {
|
||||
SkIRect clipRect = clipSpaceIBounds;
|
||||
clipRect.offset(-clipDataIn->fOrigin);
|
||||
fGpu->enableScissor(clipRect);
|
||||
this->setGpuStencil();
|
||||
return true;
|
||||
}
|
||||
|
||||
// use the stencil clip if we can't represent the clip as a rectangle.
|
||||
SkIPoint clipSpaceToStencilSpaceOffset = -clipDataIn->fOrigin;
|
||||
this->createStencilClipMask(genID,
|
||||
|
Loading…
Reference in New Issue
Block a user