1cb93a386Sopenharmony_ci/* 2cb93a386Sopenharmony_ci * Copyright 2021 Google LLC 3cb93a386Sopenharmony_ci * 4cb93a386Sopenharmony_ci * Use of this source code is governed by a BSD-style license that can be 5cb93a386Sopenharmony_ci * found in the LICENSE file. 6cb93a386Sopenharmony_ci */ 7cb93a386Sopenharmony_ci 8cb93a386Sopenharmony_ci#ifndef skgpu_MtlBackendContext_DEFINED 9cb93a386Sopenharmony_ci#define skgpu_MtlBackendContext_DEFINED 10cb93a386Sopenharmony_ci 11cb93a386Sopenharmony_ci#include "experimental/graphite/include/mtl/MtlTypes.h" 12cb93a386Sopenharmony_ci 13cb93a386Sopenharmony_cinamespace skgpu::mtl { 14cb93a386Sopenharmony_ci 15cb93a386Sopenharmony_ci// The BackendContext contains all of the base Metal objects needed by the MtlGpu. The assumption 16cb93a386Sopenharmony_ci// is that the client will set these up and pass them to the MtlGpu constructor. 17cb93a386Sopenharmony_cistruct SK_API BackendContext { 18cb93a386Sopenharmony_ci sk_cfp<CFTypeRef> fDevice; 19cb93a386Sopenharmony_ci sk_cfp<CFTypeRef> fQueue; 20cb93a386Sopenharmony_ci}; 21cb93a386Sopenharmony_ci 22cb93a386Sopenharmony_ci} // namespace skgpu::mtl 23cb93a386Sopenharmony_ci 24cb93a386Sopenharmony_ci#endif // skgpu_MtlBackendContext_DEFINED 25