Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
12
13namespace impeller {
14
16 public:
18 const vk::Device& device,
19 vk::Image image);
20
21 // |TextureSourceVK|
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
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_
vk::Image GetImage() const override
Get the image handle for this texture source.
vk::ImageView GetImageView() const override
Retrieve the image view used for sampling/blitting/compute with this texture source.
bool IsSwapchainImage() const override
Determines if swapchain image. That is, an image used as the root render target.
vk::ImageView GetRenderTargetView() const override
Retrieve the image view used for render target attachments with this texture source.
Abstract base class that represents a vkImage and an vkImageView.
VkDevice device
Definition main.cc:53
sk_sp< SkImage > image
Definition examples.cpp:29
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...
#define VK_NULL_HANDLE
Definition vulkan_core.h:46