Index: include/gpu/GrTypesPriv.h |
diff --git a/include/gpu/GrTypesPriv.h b/include/gpu/GrTypesPriv.h |
index d5227ae6f12b6b05e2f973f150265b45f5c4f67c..b22f48026c19440c185a0c47f99dacc70cc81b54 100644 |
--- a/include/gpu/GrTypesPriv.h |
+++ b/include/gpu/GrTypesPriv.h |
@@ -10,6 +10,7 @@ |
#include "GrTypes.h" |
#include "SkTArray.h" |
+#include "SkRect.h" |
/** |
* Types of shader-language-specific boxed variables we can create. (Currently only GrGLShaderVars, |
@@ -240,4 +241,16 @@ enum GrIOType { |
kRW_GrIOType |
}; |
+struct GrScissorState { |
+ GrScissorState() : fEnabled(false) {} |
+ void set(const SkIRect& rect) { fRect = rect; fEnabled = true; } |
+ bool operator==(const GrScissorState& other) const { |
+ return fEnabled == other.fEnabled && |
+ (false == fEnabled || fRect == other.fRect); |
+ } |
+ bool operator!=(const GrScissorState& other) const { return !(*this == other); } |
+ bool fEnabled; |
+ SkIRect fRect; |
+}; |
+ |
#endif |