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

Unified Diff: src/gpu/GrClipMaskManager.cpp

Issue 205213002: Remove unnecessary isrect code in clip mask manager (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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 | « no previous file | no next file » | 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 96f4b209e385944584f1339d87bc5bdd57e6b82b..b919d297f99b510634dddde691df26cc39f074f8 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -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,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698