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/ports/SkCFObject.h" 12 #include "include/private/base/SkAPI.h" 13 14 #import <CoreFoundation/CoreFoundation.h> 15 16 namespace skgpu::graphite { 17 18 // The MtlBackendContext contains all of the base Metal objects needed by the graphite Metal 19 // backend. The client will create this object and pass it into the Context::MakeMetal factory call 20 // when setting up Skia. 21 struct SK_API MtlBackendContext { 22 sk_cfp<CFTypeRef> fDevice; 23 sk_cfp<CFTypeRef> fQueue; 24 }; 25 26 } // namespace skgpu::graphite 27 28 #endif // skgpu_graphite_MtlBackendContext_DEFINED 29