Flutter Engine
The Flutter Engine
GrMtlDirectContext.mm
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 */
8
14
15namespace GrDirectContexts {
17 GrContextOptions defaultOptions;
18 return MakeMetal(backendContext, defaultOptions);
19}
20
25 options,
27
29 GrMtlTrampoline::MakeGpu(backendContext, options, direct.get()));
30 if (!GrDirectContextPriv::Init(direct)) {
31 return nullptr;
32 }
33
34 return direct;
35}
36} // namespace GrDirectContexts
const char * options
static sk_sp< GrContextThreadSafeProxy > Make(GrBackendApi, const GrContextOptions &)
static void SetGpu(const sk_sp< GrDirectContext > &ctx, std::unique_ptr< GrGpu > gpu)
static bool Init(const sk_sp< GrDirectContext > &ctx)
static sk_sp< GrDirectContext > Make(GrBackendApi backend, const GrContextOptions &options, sk_sp< GrContextThreadSafeProxy > proxy)
static std::unique_ptr< GrGpu > MakeGpu(const GrMtlBackendContext &, const GrContextOptions &, GrDirectContext *)
T * get() const
Definition: SkRefCnt.h:303
SK_API sk_sp< GrDirectContext > MakeMetal(const GrMtlBackendContext &, const GrContextOptions &)