| 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 * Indicates the type of pending IO operations that can be recorded for gpu reso
urces. | 394 * Indicates the type of pending IO operations that can be recorded for gpu reso
urces. |
| 395 */ | 395 */ |
| 396 enum GrIOType { | 396 enum GrIOType { |
| 397 kRead_GrIOType, | 397 kRead_GrIOType, |
| 398 kWrite_GrIOType, | 398 kWrite_GrIOType, |
| 399 kRW_GrIOType | 399 kRW_GrIOType |
| 400 }; | 400 }; |
| 401 | 401 |
| 402 struct GrScissorState { | 402 struct GrScissorState { |
| 403 GrScissorState() : fEnabled(false) {} | 403 GrScissorState() : fEnabled(false) {} |
| 404 GrScissorState(const SkIRect& rect) : fEnabled(true), fRect(rect) {} |
| 405 void setDisabled() { fEnabled = false; } |
| 404 void set(const SkIRect& rect) { fRect = rect; fEnabled = true; } | 406 void set(const SkIRect& rect) { fRect = rect; fEnabled = true; } |
| 405 bool operator==(const GrScissorState& other) const { | 407 bool operator==(const GrScissorState& other) const { |
| 406 return fEnabled == other.fEnabled && | 408 return fEnabled == other.fEnabled && |
| 407 (false == fEnabled || fRect == other.fRect); | 409 (false == fEnabled || fRect == other.fRect); |
| 408 } | 410 } |
| 409 bool operator!=(const GrScissorState& other) const { return !(*this == other
); } | 411 bool operator!=(const GrScissorState& other) const { return !(*this == other
); } |
| 410 | 412 |
| 411 bool enabled() const { return fEnabled; } | 413 bool enabled() const { return fEnabled; } |
| 412 const SkIRect& rect() const { return fRect; } | 414 const SkIRect& rect() const { return fRect; } |
| 413 | 415 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 * Specifies if the holder owns the backend, OpenGL or Vulkan, object. | 470 * Specifies if the holder owns the backend, OpenGL or Vulkan, object. |
| 469 */ | 471 */ |
| 470 enum class GrBackendObjectOwnership : bool { | 472 enum class GrBackendObjectOwnership : bool { |
| 471 /** Holder does not destroy the backend object. */ | 473 /** Holder does not destroy the backend object. */ |
| 472 kBorrowed = false, | 474 kBorrowed = false, |
| 473 /** Holder destroys the backend object. */ | 475 /** Holder destroys the backend object. */ |
| 474 kOwned = true | 476 kOwned = true |
| 475 }; | 477 }; |
| 476 | 478 |
| 477 #endif | 479 #endif |
| OLD | NEW |