1 /* 2 * Copyright 2021 Google LLC 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 skgpu_graphite_MtlBackendContext_DEFINED 9 #define skgpu_graphite_MtlBackendContext_DEFINED 10 11 #include "include/gpu/graphite/mtl/MtlGraphiteTypes.h" 12 13 namespace skgpu::graphite { 14 15 // The MtlBackendContext contains all of the base Metal objects needed by the graphite Metal 16 // backend. The client will create this object and pass it into the Context::MakeMetal factory call 17 // when setting up Skia. 18 struct SK_API MtlBackendContext { 19 sk_cfp<CFTypeRef> fDevice; 20 sk_cfp<CFTypeRef> fQueue; 21 }; 22 23 } // namespace skgpu::graphite 24 25 #endif // skgpu_graphite_MtlBackendContext_DEFINED 26