blob: 656b65cd6d529db920f4525b858089067d4f0fb4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef GrMtlUtil_DEFINED
#define GrMtlUtil_DEFINED
#import <Metal/Metal.h>
#include "GrTypesPriv.h"
/**
* Returns the Metal texture format for the given GrPixelConfig
*/
bool GrPixelConfigToMTLFormat(GrPixelConfig config, MTLPixelFormat* format);
/**
* Returns the GrPixelConfig for the given Metal texture format
*/
GrPixelConfig GrMTLFormatToPixelConfig(MTLPixelFormat format);
/**
* Returns a id<MTLTexture> to the MTLTexture pointed at by the const void*. Will use
* __bridge_transfer if we are adopting ownership.
*/
id<MTLTexture> GrGetMTLTexture(const void* mtlTexture, GrWrapOwnership);
#endif
|