OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef GrTypesPriv_DEFINED | 8 #ifndef GrTypesPriv_DEFINED |
9 #define GrTypesPriv_DEFINED | 9 #define GrTypesPriv_DEFINED |
10 | 10 |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 }; | 242 }; |
243 | 243 |
244 struct GrScissorState { | 244 struct GrScissorState { |
245 GrScissorState() : fEnabled(false) {} | 245 GrScissorState() : fEnabled(false) {} |
246 void set(const SkIRect& rect) { fRect = rect; fEnabled = true; } | 246 void set(const SkIRect& rect) { fRect = rect; fEnabled = true; } |
247 bool operator==(const GrScissorState& other) const { | 247 bool operator==(const GrScissorState& other) const { |
248 return fEnabled == other.fEnabled && | 248 return fEnabled == other.fEnabled && |
249 (false == fEnabled || fRect == other.fRect); | 249 (false == fEnabled || fRect == other.fRect); |
250 } | 250 } |
251 bool operator!=(const GrScissorState& other) const { return !(*this == other
); } | 251 bool operator!=(const GrScissorState& other) const { return !(*this == other
); } |
| 252 |
| 253 bool enabled() const { return fEnabled; } |
| 254 const SkIRect& rect() const { return fRect; } |
| 255 |
| 256 private: |
252 bool fEnabled; | 257 bool fEnabled; |
253 SkIRect fRect; | 258 SkIRect fRect; |
254 }; | 259 }; |
255 | 260 |
256 #endif | 261 #endif |
OLD | NEW |