Flutter Engine
The Flutter Engine
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 , fSharedContext(context)
34 , fFramebuffer(framebuffer) {}
35
36void VulkanFramebuffer::freeGpuData() {
37 VULKAN_CALL(fSharedContext->interface(),
38 DestroyFramebuffer(fSharedContext->device(), fFramebuffer, nullptr));
39}
40
41} // namespace skgpu::graphite
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
#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
Definition: GpuTools.h:21
Budgeted
Definition: GpuTypes.h:35
VkResult
Definition: vulkan_core.h:140
@ VK_SUCCESS
Definition: vulkan_core.h:141