Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
impeller
renderer
backend
vulkan
swapchain
khr
khr_swapchain_image_vk.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_SWAPCHAIN_KHR_KHR_SWAPCHAIN_IMAGE_VK_H_
6
#define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_SWAPCHAIN_KHR_KHR_SWAPCHAIN_IMAGE_VK_H_
7
8
#include "
impeller/geometry/size.h
"
9
#include "
impeller/renderer/backend/vulkan/formats_vk.h
"
10
#include "
impeller/renderer/backend/vulkan/texture_source_vk.h
"
11
#include "
impeller/renderer/backend/vulkan/vk.h
"
12
13
namespace
impeller
{
14
15
class
KHRSwapchainImageVK
final :
public
TextureSourceVK
{
16
public
:
17
KHRSwapchainImageVK
(
TextureDescriptor
desc,
18
const
vk::Device&
device
,
19
vk::Image
image
);
20
21
// |TextureSourceVK|
22
~KHRSwapchainImageVK
()
override
;
23
24
bool
IsValid
()
const
;
25
26
// |TextureSourceVK|
27
vk::Image
GetImage
()
const override
;
28
29
// |TextureSourceVK|
30
vk::ImageView
GetImageView
()
const override
;
31
32
// |TextureSourceVK|
33
vk::ImageView
GetRenderTargetView
()
const override
;
34
35
// |TextureSourceVK|
36
bool
IsSwapchainImage
()
const override
;
37
38
private
:
39
vk::Image image_ =
VK_NULL_HANDLE
;
40
vk::UniqueImageView image_view_ = {};
41
bool
is_valid_ =
false
;
42
43
KHRSwapchainImageVK
(
const
KHRSwapchainImageVK
&) =
delete
;
44
45
KHRSwapchainImageVK
& operator=(
const
KHRSwapchainImageVK
&) =
delete
;
46
};
47
48
}
// namespace impeller
49
50
#endif
// FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_SWAPCHAIN_KHR_KHR_SWAPCHAIN_IMAGE_VK_H_
impeller::KHRSwapchainImageVK
Definition
khr_swapchain_image_vk.h:15
impeller::KHRSwapchainImageVK::IsValid
bool IsValid() const
Definition
khr_swapchain_image_vk.cc:34
impeller::KHRSwapchainImageVK::GetImage
vk::Image GetImage() const override
Get the image handle for this texture source.
Definition
khr_swapchain_image_vk.cc:39
impeller::KHRSwapchainImageVK::GetImageView
vk::ImageView GetImageView() const override
Retrieve the image view used for sampling/blitting/compute with this texture source.
Definition
khr_swapchain_image_vk.cc:44
impeller::KHRSwapchainImageVK::IsSwapchainImage
bool IsSwapchainImage() const override
Determines if swapchain image. That is, an image used as the root render target.
Definition
khr_swapchain_image_vk.cc:54
impeller::KHRSwapchainImageVK::~KHRSwapchainImageVK
~KHRSwapchainImageVK() override
impeller::KHRSwapchainImageVK::GetRenderTargetView
vk::ImageView GetRenderTargetView() const override
Retrieve the image view used for render target attachments with this texture source.
Definition
khr_swapchain_image_vk.cc:49
impeller::TextureSourceVK
Abstract base class that represents a vkImage and an vkImageView.
Definition
texture_source_vk.h:28
device
VkDevice device
Definition
main.cc:53
image
sk_sp< SkImage > image
Definition
examples.cpp:29
formats_vk.h
size.h
impeller
Definition
texture.h:18
impeller::TextureDescriptor
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...
Definition
texture_descriptor.h:37
texture_source_vk.h
vk.h
VK_NULL_HANDLE
#define VK_NULL_HANDLE
Definition
vulkan_core.h:46
Generated on Fri Apr 26 2024 06:14:13 for Flutter Engine by
1.9.8