Flutter Engine
The Flutter Engine
GrVkBackendSemaphore.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 */
8
12
14public:
15 GrVkBackendSemaphoreData(VkSemaphore semaphore) : fSemaphore(semaphore) {}
16
17 VkSemaphore semaphore() const { return fSemaphore; }
18
19private:
20 void copyTo(AnySemaphoreData& data) const override {
21 data.emplace<GrVkBackendSemaphoreData>(fSemaphore);
22 }
23
24#if defined(SK_DEBUG)
25 GrBackendApi type() const override { return GrBackendApi::kVulkan; }
26#endif
27
28 VkSemaphore fSemaphore;
29};
30
34 return static_cast<const GrVkBackendSemaphoreData*>(data);
35}
36
37namespace GrBackendSemaphores {
38GrBackendSemaphore MakeVk(VkSemaphore semaphore) {
41}
42
43VkSemaphore GetVkSemaphore(const GrBackendSemaphore& sem) {
47 return data->semaphore();
48}
49} // namespace GrBackendSemaphores
GrBackendApi
Definition: GrTypes.h:95
static const GrVkBackendSemaphoreData * get_and_cast_data(const GrBackendSemaphore &sem)
#define SkASSERT(cond)
Definition: SkAssert.h:116
GLenum type
GrBackendSemaphore::AnySemaphoreData AnySemaphoreData
static const GrBackendSemaphoreData * GetBackendData(const GrBackendSemaphore &sem)
static GrBackendSemaphore MakeGrBackendSemaphore(GrBackendApi backend, const SemaphoreData &data)
GrBackendApi backend() const
GrVkBackendSemaphoreData(VkSemaphore semaphore)
SK_API GrBackendSemaphore MakeVk(VkSemaphore semaphore)
SK_API VkSemaphore GetVkSemaphore(const GrBackendSemaphore &)
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63