aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-07-29 12:24:29 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-29 12:24:29 -0700
commit6d9a213694cd30974f2d13261eade51cd6f1ee1f (patch)
tree628179f64c20d30657ce487dbf9430b7a4696751
parent4c18b62a004599d5a36ab7d772302dff2be91a3b (diff)
If scissor would be empty in GrClipMaskManager::SetupClipping indicate draw can be skipped.
-rw-r--r--src/gpu/GrClipMaskManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index b2b3603b94..8e57fc84d5 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -258,7 +258,7 @@ bool GrClipMaskManager::SetupClipping(GrContext* context,
&clipSpaceIBounds,
&requiresAA);
if (elements.isEmpty()) {
- if (GrReducedClip::kAllOut_InitialState == initialState) {
+ if (GrReducedClip::kAllOut_InitialState == initialState || clipSpaceIBounds.isEmpty()) {
return false;
} else {
SkIRect scissorSpaceIBounds(clipSpaceIBounds);