• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
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 "include/gpu/GrTypes.h"
12 #include "include/ports/SkCFObject.h"
13 
14 /**
15  * Declares typedefs for Metal types used in Ganesh cpp code
16  */
17 typedef unsigned int GrMTLPixelFormat;
18 
19 ///////////////////////////////////////////////////////////////////////////////
20 
21 /**
22  * Types for interacting with Metal resources created externally to Skia.
23  * This is used by GrBackendObjects.
24  */
25 struct GrMtlTextureInfo {
26 public:
GrMtlTextureInfoGrMtlTextureInfo27     GrMtlTextureInfo() {}
28 
29     sk_cf_obj<const void*> fTexture;
30 
31     bool operator==(const GrMtlTextureInfo& that) const {
32         return fTexture == that.fTexture;
33     }
34 };
35 
36 #endif
37