Brian Salomon | f391d0f | 2018-12-14 09:18:50 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018 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 GrMtlCppUtil_DEFINED |
| 9 | #define GrMtlCppUtil_DEFINED |
| 10 | |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 11 | #include "include/gpu/mtl/GrMtlTypes.h" |
Brian Salomon | f391d0f | 2018-12-14 09:18:50 -0500 | [diff] [blame] | 12 | |
| 13 | // Utilities that can be used from cpp files (rather than .mm). |
| 14 | |
| 15 | GrMTLPixelFormat GrGetMTLPixelFormatFromMtlTextureInfo(const GrMtlTextureInfo&); |
| 16 | |
Robert Phillips | bac4672 | 2019-08-01 15:09:17 -0400 | [diff] [blame] | 17 | #if GR_TEST_UTILS |
| 18 | const char* GrMtlFormatToStr(GrMTLPixelFormat mtlFormat); |
Robert Phillips | 7f36798 | 2019-09-26 14:01:36 -0400 | [diff] [blame^] | 19 | bool GrMtlFormatIsBGRA(GrMTLPixelFormat mtlFormat); |
Robert Phillips | bac4672 | 2019-08-01 15:09:17 -0400 | [diff] [blame] | 20 | #endif |
Brian Salomon | f391d0f | 2018-12-14 09:18:50 -0500 | [diff] [blame] | 21 | |
| 22 | #endif |