Flutter Engine
The Flutter Engine
third_party
skia
src
gpu
graphite
vk
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
8
#include "
src/gpu/graphite/vk/VulkanFramebuffer.h
"
9
10
#include "
src/gpu/graphite/vk/VulkanSharedContext.h
"
11
12
namespace
skgpu::graphite
{
13
14
sk_sp<VulkanFramebuffer>
VulkanFramebuffer::Make
(
const
VulkanSharedContext
* context,
15
const
VkFramebufferCreateInfo
& framebufferInfo) {
16
VkFramebuffer
framebuffer
;
17
VkResult
result
;
18
VULKAN_CALL_RESULT
(
19
context,
20
result
,
21
CreateFramebuffer(context->
device
(), &framebufferInfo,
nullptr
, &
framebuffer
));
22
if
(
result
!=
VK_SUCCESS
) {
23
return
nullptr
;
24
}
25
return
sk_sp<VulkanFramebuffer>
(
new
VulkanFramebuffer
(context,
framebuffer
));
26
}
27
28
VulkanFramebuffer::VulkanFramebuffer(
const
VulkanSharedContext
* context, VkFramebuffer framebuffer)
29
:
Resource
(context,
30
Ownership
::
kOwned
,
31
skgpu
::
Budgeted
::
kYes
,
32
/*gpuMemorySize=*/
0)
33
, fSharedContext(context)
34
, fFramebuffer(framebuffer) {}
35
36
void
VulkanFramebuffer::freeGpuData() {
37
VULKAN_CALL
(fSharedContext->
interface
(),
38
DestroyFramebuffer(fSharedContext->
device
(), fFramebuffer,
nullptr
));
39
}
40
41
}
// namespace skgpu::graphite
GrBackendObjectOwnership::kOwned
@ kOwned
SkApplyPerspectiveClip::kYes
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
VulkanFramebuffer.h
VULKAN_CALL
#define VULKAN_CALL(IFACE, X)
Definition:
VulkanGraphiteUtilsPriv.h:22
VULKAN_CALL_RESULT
#define VULKAN_CALL_RESULT(SHARED_CONTEXT, RESULT, X)
Definition:
VulkanGraphiteUtilsPriv.h:33
VulkanSharedContext.h
sk_sp
Definition:
SkRefCnt.h:220
skgpu::graphite::Resource
Definition:
Resource.h:37
skgpu::graphite::VulkanFramebuffer
Definition:
VulkanFramebuffer.h:22
skgpu::graphite::VulkanFramebuffer::framebuffer
VkFramebuffer framebuffer()
Definition:
VulkanFramebuffer.h:27
skgpu::graphite::VulkanFramebuffer::Make
static sk_sp< VulkanFramebuffer > Make(const VulkanSharedContext *, const VkFramebufferCreateInfo &)
Definition:
VulkanFramebuffer.cpp:14
skgpu::graphite::VulkanSharedContext
Definition:
VulkanSharedContext.h:28
skgpu::graphite::VulkanSharedContext::device
VkDevice device() const
Definition:
VulkanSharedContext.h:39
skgpu::graphite::VulkanSharedContext::interface
const skgpu::VulkanInterface * interface() const
Definition:
VulkanSharedContext.h:35
result
GAsyncResult * result
Definition:
fl_text_input_plugin.cc:106
skgpu::graphite
Definition:
BoundsManagerBench.cpp:27
skgpu::graphite::Ownership
Ownership
Definition:
ResourceTypes.h:128
skgpu
Definition:
GpuTools.h:21
skgpu::Budgeted
Budgeted
Definition:
GpuTypes.h:35
VkFramebufferCreateInfo
Definition:
vulkan_core.h:3817
VkResult
VkResult
Definition:
vulkan_core.h:140
VK_SUCCESS
@ VK_SUCCESS
Definition:
vulkan_core.h:141
Generated on Sun Jun 23 2024 21:56:28 for Flutter Engine by
1.9.4