| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 GrTypes_DEFINED | 8 #ifndef GrTypes_DEFINED |
| 9 #define GrTypes_DEFINED | 9 #define GrTypes_DEFINED |
| 10 | 10 |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 * should be verified. | 405 * should be verified. |
| 406 */ | 406 */ |
| 407 kCheckAllocation_GrSurfaceFlag = 0x4, | 407 kCheckAllocation_GrSurfaceFlag = 0x4, |
| 408 }; | 408 }; |
| 409 | 409 |
| 410 GR_MAKE_BITFIELD_OPS(GrSurfaceFlags) | 410 GR_MAKE_BITFIELD_OPS(GrSurfaceFlags) |
| 411 | 411 |
| 412 // opaque type for 3D API object handles | 412 // opaque type for 3D API object handles |
| 413 typedef intptr_t GrBackendObject; | 413 typedef intptr_t GrBackendObject; |
| 414 | 414 |
| 415 enum class GrBackendObjectLifeCycle { |
| 416 /** |
| 417 * The resource is created, owned and freed by Skia. |
| 418 */ |
| 419 kInternal, |
| 420 /** |
| 421 * An external resource with ownership transfered into Skia. Skia will free
the resource. |
| 422 */ |
| 423 kAdopted, |
| 424 /** |
| 425 * An external resource, but Skia does not manage the lifetime of the underl
ying backend |
| 426 * 3D API object(s). The client is responsible for freeing those. Used to in
ject client- |
| 427 * created GPU resources into Skia (e.g. to render to a client-created textu
re). |
| 428 */ |
| 429 kBorrowed |
| 430 }; |
| 431 |
| 415 /** | 432 /** |
| 416 * Some textures will be stored such that the upper and left edges of the conten
t meet at the | 433 * Some textures will be stored such that the upper and left edges of the conten
t meet at the |
| 417 * the origin (in texture coord space) and for other textures the lower and left
edges meet at | 434 * the origin (in texture coord space) and for other textures the lower and left
edges meet at |
| 418 * the origin. kDefault_GrSurfaceOrigin sets textures to TopLeft, and render tar
gets | 435 * the origin. kDefault_GrSurfaceOrigin sets textures to TopLeft, and render tar
gets |
| 419 * to BottomLeft. | 436 * to BottomLeft. |
| 420 */ | 437 */ |
| 421 | 438 |
| 422 enum GrSurfaceOrigin { | 439 enum GrSurfaceOrigin { |
| 423 kDefault_GrSurfaceOrigin, // DEPRECATED; to be removed | 440 kDefault_GrSurfaceOrigin, // DEPRECATED; to be removed |
| 424 kTopLeft_GrSurfaceOrigin, | 441 kTopLeft_GrSurfaceOrigin, |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 return 4 * width * height; | 701 return 4 * width * height; |
| 685 } | 702 } |
| 686 } | 703 } |
| 687 | 704 |
| 688 /** | 705 /** |
| 689 * This value translates to reseting all the context state for any backend. | 706 * This value translates to reseting all the context state for any backend. |
| 690 */ | 707 */ |
| 691 static const uint32_t kAll_GrBackendState = 0xffffffff; | 708 static const uint32_t kAll_GrBackendState = 0xffffffff; |
| 692 | 709 |
| 693 #endif | 710 #endif |
| OLD | NEW |