blob: 8d96c85690651b88ef7c49980e50c401c7a2a96d [file] [log] [blame]
/*
* 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 GrMtlTypes_DEFINED
#define GrMtlTypes_DEFINED
#include "include/gpu/GrTypes.h"
/**
* Declares typedefs for Metal types used in Ganesh cpp code
*/
typedef unsigned int GrMTLPixelFormat;
///////////////////////////////////////////////////////////////////////////////
/**
* Types for interacting with Metal resources created externally to Skia. Holds
* the MTLTexture as a weak const void*. This is used by GrBackendObjects. Note
* that GrBackendObjects created with a GrMtlTextureInfo will take a strong
* reference to the MTLTexture.
*/
struct GrMtlTextureInfo {
public:
const void* fTexture; // Pointer to MTLTexture
bool operator==(const GrMtlTextureInfo& that) const {
return fTexture == that.fTexture;
}
};
#endif