Greg Daniel | eee5183 | 2017-07-28 11:31:19 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef GrMtlTypes_DEFINED |
| 9 | #define GrMtlTypes_DEFINED |
| 10 | |
| 11 | #include "GrTypes.h" |
| 12 | |
Timothy Liang | 4e85e80 | 2018-06-28 16:37:18 -0400 | [diff] [blame^] | 13 | /** |
| 14 | * Declares typedefs for Metal types used in Ganesh cpp code |
| 15 | */ |
| 16 | typedef unsigned int GrMTLPixelFormat; |
| 17 | |
| 18 | /////////////////////////////////////////////////////////////////////////////// |
| 19 | /** |
| 20 | * Types for interacting with Metal resources created externally to Skia. Holds the MTLTexture as a |
| 21 | * const void*. This is used by GrBackendObjects. |
| 22 | */ |
| 23 | struct GrMtlTextureInfo { |
| 24 | public: |
| 25 | const void* fTexture; // Pointer to MTLTexture |
| 26 | |
| 27 | bool operator==(const GrMtlTextureInfo& that) const { |
| 28 | return fTexture == that.fTexture; |
| 29 | } |
| 30 | }; |
Greg Daniel | eee5183 | 2017-07-28 11:31:19 -0400 | [diff] [blame] | 31 | |
| 32 | #endif |