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

Unified Diff: src/gpu/GrFixedClip.cpp

Issue 2262473003: Define clear regions in terms of GrFixedClip (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_fixedcliptosrc
Patch Set: rebase Created 4 years, 4 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/GrFixedClip.h ('k') | src/gpu/GrGpuCommandBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrFixedClip.cpp
diff --git a/src/gpu/GrFixedClip.cpp b/src/gpu/GrFixedClip.cpp
index c42214b2711e2cff55d20301a3c12e44a3c37189..ebdd49bbf80f1ea789c8d1a5b61a94337ecf035a 100644
--- a/src/gpu/GrFixedClip.cpp
+++ b/src/gpu/GrFixedClip.cpp
@@ -10,13 +10,6 @@
#include "GrAppliedClip.h"
#include "GrDrawContext.h"
-bool GrFixedClip::quickContains(const SkRect& rect) const {
- if (fHasStencilClip) {
- return false;
- }
- return !fScissorState.enabled() || GrClip::IsInsideClip(fScissorState.rect(), rect);
-}
-
void GrFixedClip::getConservativeBounds(int width, int height, SkIRect* devResult,
bool* isIntersectionOfRects) const {
devResult->setXYWH(0, 0, width, height);
@@ -46,9 +39,10 @@ bool GrFixedClip::apply(GrContext*, GrDrawContext* drawContext, bool isHWAntiAli
}
}
- if (fHasStencilClip) {
- out->addStencilClip();
- }
-
return true;
}
+
+const GrFixedClip& GrFixedClip::Disabled() {
+ static const GrFixedClip disabled = GrFixedClip();
+ return disabled;
+}
« no previous file with comments | « src/gpu/GrFixedClip.h ('k') | src/gpu/GrGpuCommandBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698