blob: 8b973f717e67aac1d1c94c899559f340ab088f28 [file] [log] [blame]
Greg Danieleee51832017-07-28 11:31:19 -04001/*
2 * Copyright 2017 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 GrMtlTypes_DEFINED
9#define GrMtlTypes_DEFINED
10
11#include "GrTypes.h"
12
Timothy Liang4e85e802018-06-28 16:37:18 -040013/**
14 * Declares typedefs for Metal types used in Ganesh cpp code
15 */
16typedef unsigned int GrMTLPixelFormat;
17
18///////////////////////////////////////////////////////////////////////////////
19/**
20 * Types for interacting with Metal resources created externally to Skia. Holds the MTLTexture as a
21 * const void*. This is used by GrBackendObjects.
22 */
23struct GrMtlTextureInfo {
24public:
25 const void* fTexture; // Pointer to MTLTexture
26
27 bool operator==(const GrMtlTextureInfo& that) const {
28 return fTexture == that.fTexture;
29 }
30};
Greg Danieleee51832017-07-28 11:31:19 -040031
32#endif