Flutter Engine
The Flutter Engine
GrVkDirectContext.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2023 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
9
13#include "include/gpu/GrTypes.h"
17
18namespace GrDirectContexts {
20 GrContextOptions defaultOptions;
21 return MakeVulkan(backendContext, defaultOptions);
22}
23
26 auto direct = GrDirectContextPriv::Make(
27 GrBackendApi::kVulkan, options, sk_make_sp<GrVkContextThreadSafeProxy>(options));
28
30 GrVkGpu::Make(backendContext, options, direct.get()));
31 if (!GrDirectContextPriv::Init(direct)) {
32 return nullptr;
33 }
34
35 return direct;
36}
37} // namespace GrDirectContexts
const char * options
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 > Make(const skgpu::VulkanBackendContext &, const GrContextOptions &, GrDirectContext *)
Definition: GrVkGpu.cpp:70
SK_API sk_sp< GrDirectContext > MakeVulkan(const skgpu::VulkanBackendContext &, const GrContextOptions &)