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

Unified Diff: include/gpu/GrTypesPriv.h

Issue 1971343002: Convert GrClip to an abstract base class (Closed) Base URL: https://skia.googlesource.com/skia.git@upload2_clipout
Patch Set: remove iswideopen Created 4 years, 7 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: include/gpu/GrTypesPriv.h
diff --git a/include/gpu/GrTypesPriv.h b/include/gpu/GrTypesPriv.h
index 18bc6449aad110f0f51a450d9cb26fd44413bebc..154a107e0da13602a49d5878f77473c242d7309b 100644
--- a/include/gpu/GrTypesPriv.h
+++ b/include/gpu/GrTypesPriv.h
@@ -401,7 +401,10 @@ enum GrIOType {
struct GrScissorState {
GrScissorState() : fEnabled(false) {}
+ GrScissorState(const SkIRect& rect) : fEnabled(true), fRect(rect) {}
+ void setDisabled() { fEnabled = false; }
void set(const SkIRect& rect) { fRect = rect; fEnabled = true; }
+ void setNonAA(const SkRect& rect) { rect.round(&fRect); fEnabled = true; }
bool operator==(const GrScissorState& other) const {
return fEnabled == other.fEnabled &&
(false == fEnabled || fRect == other.fRect);

Powered by Google App Engine
This is Rietveld 408576698