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

Unified Diff: src/gpu/GrClip.cpp

Issue 2137543002: Use clipped bounds for reordering decisions (Closed) Base URL: https://chromium.googlesource.com/skia.git@lessstencil
Patch Set: fix windows warning Created 4 years, 5 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 | « include/gpu/GrClip.h ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrClip.cpp
diff --git a/src/gpu/GrClip.cpp b/src/gpu/GrClip.cpp
index d74d93558597030f7fde31fa06c66d7aa857ff07..b0577c51222814a0c8f1df815ad9bd0686ca5a2b 100644
--- a/src/gpu/GrClip.cpp
+++ b/src/gpu/GrClip.cpp
@@ -44,6 +44,7 @@ void GrFixedClip::getConservativeBounds(int width, int height, SkIRect* devResul
bool GrFixedClip::apply(GrContext*, const GrPipelineBuilder& pipelineBuilder,
GrDrawContext* drawContext,
const SkRect* devBounds, GrAppliedClip* out) const {
+ SkASSERT(!fDeviceBounds.isLargest());
if (fScissorState.enabled()) {
SkIRect tightScissor;
if (!tightScissor.intersect(fScissorState.rect(),
@@ -53,11 +54,15 @@ bool GrFixedClip::apply(GrContext*, const GrPipelineBuilder& pipelineBuilder,
if (devBounds && !devBounds->intersects(SkRect::Make(tightScissor))) {
return false;
}
- out->makeScissoredStencil(fHasStencilClip, tightScissor);
+ if (fHasStencilClip) {
+ out->makeScissoredStencil(tightScissor, &fDeviceBounds);
+ } else {
+ out->makeScissored(tightScissor);
+ }
return true;
}
- out->makeStencil(fHasStencilClip);
+ out->makeStencil(fHasStencilClip, fDeviceBounds);
return true;
}
« no previous file with comments | « include/gpu/GrClip.h ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698