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

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
Index: src/gpu/GrFixedClip.cpp
diff --git a/src/gpu/GrFixedClip.cpp b/src/gpu/GrFixedClip.cpp
index c42214b2711e2cff55d20301a3c12e44a3c37189..e911bfa041e18621cd733c71220e0c8ee3232390 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;
+}

Powered by Google App Engine
This is Rietveld 408576698