aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrClip.cpp
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-07-12 05:40:39 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-12 05:40:39 -0700
commitaeadcdfbf203ccfedece9721d410192491815fc1 (patch)
tree6ded686991824c5c98a080826361f0b55dea3460 /src/gpu/GrClip.cpp
parent8792e523dcb5a436410faab701927ab8e4966f56 (diff)
Revert of Pre-crop filled rects to avoid scissor (patchset #6 id:100001 of https://codereview.chromium.org/2132073002/ )
Reason for revert: I believe that this is breaking the roll. https://codereview.chromium.org/2141923002 https://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/258434/steps/cc_unittests%20%28with%20patch%29%20on%20Mac-10.9/logs/stdio Original issue's description: > Pre-crop filled rects to avoid scissor > > Updates GrDrawContext to crop filled rects to the clip bounds before > creating batches for them. Also adds clipping logic to ignore scissor > when the draw falls completely inside. These two changes combined > reduce API traffic and improve batching. > > In the future this can and should be improved by switching to floating > point clip boundaries, thus allowing us to throw out non pixel aligned > rectangle clips as well. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2132073002 > > Committed: https://skia.googlesource.com/skia/+/7969838702135b9f127bd738728da61bc49b050a TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2145573002
Diffstat (limited to 'src/gpu/GrClip.cpp')
-rw-r--r--src/gpu/GrClip.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gpu/GrClip.cpp b/src/gpu/GrClip.cpp
index ab2acb9834..b0577c5122 100644
--- a/src/gpu/GrClip.cpp
+++ b/src/gpu/GrClip.cpp
@@ -54,14 +54,12 @@ bool GrFixedClip::apply(GrContext*, const GrPipelineBuilder& pipelineBuilder,
if (devBounds && !devBounds->intersects(SkRect::Make(tightScissor))) {
return false;
}
- if (!devBounds || !CanIgnoreScissor(fScissorState.rect(), *devBounds)) {
- if (fHasStencilClip) {
- out->makeScissoredStencil(tightScissor, &fDeviceBounds);
- } else {
- out->makeScissored(tightScissor);
- }
- return true;
+ if (fHasStencilClip) {
+ out->makeScissoredStencil(tightScissor, &fDeviceBounds);
+ } else {
+ out->makeScissored(tightScissor);
}
+ return true;
}
out->makeStencil(fHasStencilClip, fDeviceBounds);