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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
418 * should be verified. | 418 * should be verified. |
419 */ | 419 */ |
420 kCheckAllocation_GrSurfaceFlag = 0x4, | 420 kCheckAllocation_GrSurfaceFlag = 0x4, |
421 }; | 421 }; |
422 | 422 |
423 GR_MAKE_BITFIELD_OPS(GrSurfaceFlags) | 423 GR_MAKE_BITFIELD_OPS(GrSurfaceFlags) |
424 | 424 |
425 // opaque type for 3D API object handles | 425 // opaque type for 3D API object handles |
426 typedef intptr_t GrBackendObject; | 426 typedef intptr_t GrBackendObject; |
427 | 427 |
428 enum class GrBackendObjectOwnership : bool { | |
Kimmo Kinnunen
2016/04/20 13:59:03
I guess now this is quite similar to below..
bsalomon
2016/04/20 15:48:03
Looking at the latest CL I think it makes sense to
| |
429 /** Holder does not destroy the backend object. */ | |
430 kBorrowed = false, | |
431 /** Holder destroys the backend object. */ | |
432 kOwned = true | |
433 }; | |
434 | |
428 /** | 435 /** |
429 * Some textures will be stored such that the upper and left edges of the conten t meet at the | 436 * Some textures will be stored such that the upper and left edges of the conten t meet at the |
430 * the origin (in texture coord space) and for other textures the lower and left edges meet at | 437 * the origin (in texture coord space) and for other textures the lower and left edges meet at |
431 * the origin. kDefault_GrSurfaceOrigin sets textures to TopLeft, and render tar gets | 438 * the origin. kDefault_GrSurfaceOrigin sets textures to TopLeft, and render tar gets |
432 * to BottomLeft. | 439 * to BottomLeft. |
433 */ | 440 */ |
434 | 441 |
435 enum GrSurfaceOrigin { | 442 enum GrSurfaceOrigin { |
436 kDefault_GrSurfaceOrigin, // DEPRECATED; to be removed | 443 kDefault_GrSurfaceOrigin, // DEPRECATED; to be removed |
437 kTopLeft_GrSurfaceOrigin, | 444 kTopLeft_GrSurfaceOrigin, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
487 */ | 494 */ |
488 enum GrClipType { | 495 enum GrClipType { |
489 kRect_ClipType, | 496 kRect_ClipType, |
490 kPath_ClipType | 497 kPath_ClipType |
491 }; | 498 }; |
492 | 499 |
493 /////////////////////////////////////////////////////////////////////////////// | 500 /////////////////////////////////////////////////////////////////////////////// |
494 | 501 |
495 | 502 |
496 /** Ownership rules for external GPU resources imported into Skia. */ | 503 /** Ownership rules for external GPU resources imported into Skia. */ |
497 enum GrWrapOwnership { | 504 enum GrWrapOwnership { |
Kimmo Kinnunen
2016/04/20 13:59:03
.. similar to this.
The docstrings will be confusi
| |
498 /** Skia will assume the client will keep the resource alive and Skia will n ot free it. */ | 505 /** Skia will assume the client will keep the resource alive and Skia will n ot free it. */ |
499 kBorrow_GrWrapOwnership, | 506 kBorrow_GrWrapOwnership, |
500 | 507 |
501 /** Skia will assume ownership of the resource and free it. */ | 508 /** Skia will assume ownership of the resource and free it. */ |
502 kAdopt_GrWrapOwnership, | 509 kAdopt_GrWrapOwnership, |
503 }; | 510 }; |
504 | 511 |
505 /** | 512 /** |
506 * Gr can wrap an existing texture created by the client with a GrTexture | 513 * Gr can wrap an existing texture created by the client with a GrTexture |
507 * object. The client is responsible for ensuring that the texture lives at | 514 * object. The client is responsible for ensuring that the texture lives at |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
638 return 4 * width * height; | 645 return 4 * width * height; |
639 } | 646 } |
640 } | 647 } |
641 | 648 |
642 /** | 649 /** |
643 * This value translates to reseting all the context state for any backend. | 650 * This value translates to reseting all the context state for any backend. |
644 */ | 651 */ |
645 static const uint32_t kAll_GrBackendState = 0xffffffff; | 652 static const uint32_t kAll_GrBackendState = 0xffffffff; |
646 | 653 |
647 #endif | 654 #endif |
OLD | NEW |