Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
VulkanFramebuffer.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
11
12namespace skgpu::graphite {
13
15 const VkFramebufferCreateInfo& framebufferInfo) {
16 VkFramebuffer framebuffer;
19 context,
20 result,
21 CreateFramebuffer(context->device(), &framebufferInfo, nullptr, &framebuffer));
22 if (result != VK_SUCCESS) {
23 return nullptr;
24 }
26}
27
28VulkanFramebuffer::VulkanFramebuffer(const VulkanSharedContext* context, VkFramebuffer framebuffer)
29 : Resource(context,
32 /*gpuMemorySize=*/0,
33 /*label=*/"VulkanFramebuffer")
34 , fSharedContext(context)
35 , fFramebuffer(framebuffer) {
36}
37
39 VULKAN_CALL(fSharedContext->interface(),
40 DestroyFramebuffer(fSharedContext->device(), fFramebuffer, nullptr));
41}
42
43} // namespace skgpu::graphite
#define VULKAN_CALL(IFACE, X)
#define VULKAN_CALL_RESULT(SHARED_CONTEXT, RESULT, X)
static sk_sp< VulkanFramebuffer > Make(const VulkanSharedContext *, const VkFramebufferCreateInfo &)
const skgpu::VulkanInterface * interface() const
GAsyncResult * result
Budgeted
Definition GpuTypes.h:35
VkResult
@ VK_SUCCESS