Flutter Impeller
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 #pragma once
6 
7 #include "flutter/fml/macros.h"
12 
13 namespace impeller {
14 
15 class SwapchainImageVK final : public TextureSourceVK {
16  public:
18  const vk::Device& device,
19  vk::Image image);
20 
21  // |TextureSourceVK|
22  ~SwapchainImageVK() override;
23 
24  bool IsValid() const;
25 
27 
28  ISize GetSize() const;
29 
30  // |TextureSourceVK|
31  vk::Image GetImage() const override;
32 
33  std::shared_ptr<Texture> GetMSAATexture() const;
34 
35  bool HasMSAATexture() const;
36 
37  // |TextureSourceVK|
38  vk::ImageView GetImageView() const override;
39 
40  void SetMSAATexture(std::shared_ptr<Texture> msaa_tex);
41 
42  private:
43  vk::Image image_ = VK_NULL_HANDLE;
44  vk::UniqueImageView image_view_ = {};
45  std::shared_ptr<Texture> msaa_tex_;
46  bool is_valid_ = false;
47 
48  FML_DISALLOW_COPY_AND_ASSIGN(SwapchainImageVK);
49 };
50 
51 } // namespace impeller
impeller::TextureSourceVK
Definition: texture_source_vk.h:21
impeller::SwapchainImageVK::SetMSAATexture
void SetMSAATexture(std::shared_ptr< Texture > msaa_tex)
Definition: swapchain_image_vk.cc:46
impeller::SwapchainImageVK
Definition: swapchain_image_vk.h:15
impeller::SwapchainImageVK::IsValid
bool IsValid() const
Definition: swapchain_image_vk.cc:34
impeller::SwapchainImageVK::GetImage
vk::Image GetImage() const override
Definition: swapchain_image_vk.cc:59
texture_source_vk.h
impeller::SwapchainImageVK::GetPixelFormat
PixelFormat GetPixelFormat() const
Definition: swapchain_image_vk.cc:50
impeller::SwapchainImageVK::HasMSAATexture
bool HasMSAATexture() const
Definition: swapchain_image_vk.cc:42
formats_vk.h
vk.h
impeller::TSize< int64_t >
impeller::SwapchainImageVK::GetMSAATexture
std::shared_ptr< Texture > GetMSAATexture() const
Definition: swapchain_image_vk.cc:38
impeller::SwapchainImageVK::GetSize
ISize GetSize() const
Definition: swapchain_image_vk.cc:54
impeller::SwapchainImageVK::~SwapchainImageVK
~SwapchainImageVK() override
impeller::TextureDescriptor
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...
Definition: texture_descriptor.h:39
impeller::PixelFormat
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
Definition: formats.h:94
impeller::SwapchainImageVK::GetImageView
vk::ImageView GetImageView() const override
Definition: swapchain_image_vk.cc:64
impeller
Definition: aiks_context.cc:10
size.h
impeller::SwapchainImageVK::SwapchainImageVK
SwapchainImageVK(TextureDescriptor desc, const vk::Device &device, vk::Image image)
Definition: swapchain_image_vk.cc:9