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

Unified Diff: src/gpu/GrClipMaskManager.cpp

Issue 2145573002: Revert of Pre-crop filled rects to avoid scissor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « src/gpu/GrClip.cpp ('k') | src/gpu/GrDrawContext.cpp » ('j') | 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 d710fef9b341cb088656eb3511444aea7cbccdb6..c591bf11826babd6fdfe9861994a1a8bc8da9e7b 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -268,7 +268,7 @@
} else {
SkIRect scissorSpaceIBounds(clipSpaceIBounds);
scissorSpaceIBounds.offset(-clip.origin());
- if (!GrClip::CanIgnoreScissor(scissorSpaceIBounds, devBounds)) {
+ if (!SkRect::Make(scissorSpaceIBounds).contains(devBounds)) {
out->makeScissored(scissorSpaceIBounds);
}
return true;
@@ -302,11 +302,11 @@
&clipFP)) {
SkIRect scissorSpaceIBounds(clipSpaceIBounds);
scissorSpaceIBounds.offset(-clip.origin());
- if (GrClip::CanIgnoreScissor(scissorSpaceIBounds, devBounds)) {
- out->makeFPBased(std::move(clipFP), SkRect::Make(scissorSpaceIBounds));
- } else {
+ if (!SkRect::Make(scissorSpaceIBounds).contains(devBounds)) {
out->makeScissoredFPBased(std::move(clipFP), scissorSpaceIBounds);
- }
+ return true;
+ }
+ out->makeFPBased(std::move(clipFP), SkRect::Make(scissorSpaceIBounds));
return true;
}
}
@@ -369,11 +369,7 @@
// use both stencil and scissor test to the bounds for the final draw.
SkIRect scissorSpaceIBounds(clipSpaceIBounds);
scissorSpaceIBounds.offset(clipSpaceToStencilSpaceOffset);
- if (GrClip::CanIgnoreScissor(scissorSpaceIBounds, devBounds)) {
- out->makeStencil(true, devBounds);
- } else {
- out->makeScissoredStencil(scissorSpaceIBounds);
- }
+ out->makeScissoredStencil(scissorSpaceIBounds);
return true;
}
« no previous file with comments | « src/gpu/GrClip.cpp ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698