Flutter Engine
The Flutter Engine
GrMtlDirectContext.h
Go to the documentation of this file.
1/*
2 * Copyright 2024 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 GrMtlDirectContext_DEFINED
9#define GrMtlDirectContext_DEFINED
10
13
14class GrDirectContext;
15struct GrContextOptions;
17
18namespace GrDirectContexts {
19/**
20 * Makes a GrDirectContext which uses Metal as the backend. The GrMtlBackendContext contains a
21 * MTLDevice and MTLCommandQueue which should be used by the backend. These objects must
22 * have their own ref which will be released when the GrMtlBackendContext is destroyed.
23 * Ganesh will take its own ref on the objects which will be released when the GrDirectContext
24 * is destroyed.
25 */
28} // namespace GrDirectContexts
29
30#endif
#define SK_API
Definition: SkAPI.h:35
SK_API sk_sp< GrDirectContext > MakeMetal(const GrMtlBackendContext &, const GrContextOptions &)