diff options
author | Greg Daniel <egdaniel@google.com> | 2017-07-31 16:32:36 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-31 20:53:18 +0000 |
commit | 0576a45c7570686a1057ad07d8abf21a3bad403f (patch) | |
tree | 716ec46b7a0553d22244e0fc998f08b31e506bf4 /src/gpu/mtl/GrMtlUtil.h | |
parent | 96271cd1805d55b1a985652eebd0399ebe415283 (diff) |
Add GrMtlUtil class
Currently just adding support functions to go back and forth between
GrPixelConfigs and MTLPixelFormats.
Bug: skia:
Change-Id: I01a7d6877ebed87b87090ac2b920fee45dc0e856
Reviewed-on: https://skia-review.googlesource.com/29080
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/mtl/GrMtlUtil.h')
-rw-r--r-- | src/gpu/mtl/GrMtlUtil.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gpu/mtl/GrMtlUtil.h b/src/gpu/mtl/GrMtlUtil.h new file mode 100644 index 0000000000..78af7bf89f --- /dev/null +++ b/src/gpu/mtl/GrMtlUtil.h @@ -0,0 +1,26 @@ +/* + * 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 + +#include "GrTypes.h" + +#import <Metal/Metal.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); + + +#endif |