summaryrefslogtreecommitdiffstats
path: root/gfx/skia/skia/include/gpu/graphite/mtl/MtlBackendContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/skia/skia/include/gpu/graphite/mtl/MtlBackendContext.h')
-rw-r--r--gfx/skia/skia/include/gpu/graphite/mtl/MtlBackendContext.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/gfx/skia/skia/include/gpu/graphite/mtl/MtlBackendContext.h b/gfx/skia/skia/include/gpu/graphite/mtl/MtlBackendContext.h
new file mode 100644
index 0000000000..9d6d0192d1
--- /dev/null
+++ b/gfx/skia/skia/include/gpu/graphite/mtl/MtlBackendContext.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef skgpu_graphite_MtlBackendContext_DEFINED
+#define skgpu_graphite_MtlBackendContext_DEFINED
+
+#include "include/gpu/graphite/mtl/MtlGraphiteTypes.h"
+
+namespace skgpu::graphite {
+
+// The MtlBackendContext contains all of the base Metal objects needed by the graphite Metal
+// backend. The client will create this object and pass it into the Context::MakeMetal factory call
+// when setting up Skia.
+struct SK_API MtlBackendContext {
+ sk_cfp<CFTypeRef> fDevice;
+ sk_cfp<CFTypeRef> fQueue;
+};
+
+} // namespace skgpu::graphite
+
+#endif // skgpu_graphite_MtlBackendContext_DEFINED