Flutter Engine
The Flutter Engine
GrMtlCppUtil.h
Go to the documentation of this file.
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
13
14// Utilities that can be used from cpp files (rather than .mm).
15
17
18/**
19 * Gets the sample count of a texture held by GrMtlTextureInfo or zero if the texture is nil.
20 */
21int GrMtlTextureInfoSampleCount(const GrMtlTextureInfo&);
22
23#if defined(SK_DEBUG) || defined(GR_TEST_UTILS)
24bool GrMtlFormatIsBGRA8(GrMTLPixelFormat mtlFormat);
25#endif
26
27#endif
GrMTLPixelFormat GrGetMTLPixelFormatFromMtlTextureInfo(const GrMtlTextureInfo &)
Definition: GrMtlUtil.mm:228
int GrMtlTextureInfoSampleCount(const GrMtlTextureInfo &)
Definition: GrMtlUtil.mm:294
unsigned int GrMTLPixelFormat
Definition: GrMtlTypes.h:17