blob: f431ec81076914e8382041d61eb7061f34bc1d89 [file] [log] [blame]
Brian Salomonf391d0f2018-12-14 09:18:50 -05001/*
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 Kleinc0bd9f92019-04-23 12:05:21 -050011#include "include/gpu/mtl/GrMtlTypes.h"
Brian Salomonf391d0f2018-12-14 09:18:50 -050012
13// Utilities that can be used from cpp files (rather than .mm).
14
15GrMTLPixelFormat GrGetMTLPixelFormatFromMtlTextureInfo(const GrMtlTextureInfo&);
16
Brian Salomondc8fcdb2020-03-26 16:45:05 -040017uint32_t GrMtlFormatChannels(GrMTLPixelFormat);
18
Robert Phillipsbac46722019-08-01 15:09:17 -040019#if GR_TEST_UTILS
20const char* GrMtlFormatToStr(GrMTLPixelFormat mtlFormat);
Robert Phillips9a30ee02020-04-29 08:58:39 -040021bool GrMtlFormatIsBGRA8(GrMTLPixelFormat mtlFormat);
Robert Phillipsbac46722019-08-01 15:09:17 -040022#endif
Brian Salomonf391d0f2018-12-14 09:18:50 -050023
24#endif