| Flutter Impeller |

Public Member Functions | List of all members
impeller::TextureVK Class Referencefinal

`#include <texture_vk.h>`

Inheritance diagram for impeller::TextureVK:

## Public Member Functions
| TextureVK (std::weak_ptr< Context > context, std::shared_ptr< TextureSourceVK > source)
| ~TextureVK () override
vk::Image | GetImage () const
vk::ImageView | GetImageView () const
bool | SetLayout (const BarrierVK &barrier) const
vk::ImageLayout | SetLayoutWithoutEncoding (vk::ImageLayout layout) const
vk::ImageLayout | GetLayout () const
std::shared_ptr< const TextureSourceVK > | GetTextureSource () const
Public Member Functions inherited from impeller::Texture
virtual | ~Texture ()
bool | SetContents (const uint8_t *contents, size_t length, size_t slice=0, bool is_opaque=false)
bool | SetContents (std::shared_ptr< const fml::Mapping > mapping, size_t slice=0, bool is_opaque=false)
bool | IsOpaque () const
size_t | GetMipCount () const
const TextureDescriptor & | GetTextureDescriptor () const
void | SetCoordinateSystem (TextureCoordinateSystem coordinate_system)
TextureCoordinateSystem | GetCoordinateSystem () const
virtual Scalar | GetYCoordScale () const
bool | NeedsMipmapGeneration () const

## Additional Inherited Members
Static Public Member Functions inherited from impeller::BackendCast< TextureVK, Texture >
static TextureVK & | Cast (Texture &base)
static const TextureVK & | Cast (const Texture &base)
static TextureVK * | Cast (Texture *base)
static const TextureVK * | Cast (const Texture *base)
Protected Member Functions inherited from impeller::Texture
| Texture (TextureDescriptor desc)
Protected Attributes inherited from impeller::Texture
bool | mipmap_generated_ = false

## Detailed Description

Definition at line 21 of file texture_vk.h.

## Constructor & Destructor Documentation

## ◆ TextureVK()

impeller::TextureVK::TextureVK | ( | std::weak_ptr< Context > | context,
|  | std::shared_ptr< TextureSourceVK > | source
| ) |  |

Definition at line 13 of file texture_vk.cc.

15 : Texture(source->GetTextureDescriptor()),
16 context_(std::move(context)),
17 source_(std::move(source)) {}

## ◆ ~TextureVK()

impeller::TextureVK::~TextureVK | ( |  | ) |
| override default

## Member Function Documentation

## ◆ GetImage()

vk::Image impeller::TextureVK::GetImage | ( |  | ) | const

Definition at line 128 of file texture_vk.cc.

128 {
129 return source_->GetImage();
130 }

## ◆ GetImageView()

vk::ImageView impeller::TextureVK::GetImageView | ( |  | ) | const

Definition at line 132 of file texture_vk.cc.

132 {
133 return source_->GetImageView();
134 }

Referenced by impeller::AllocateAndBindDescriptorSets().

## ◆ GetLayout()

vk::ImageLayout impeller::TextureVK::GetLayout | ( |  | ) | const

Definition at line 150 of file texture_vk.cc.

150 {
151 return source_ ? source_->GetLayout() : vk::ImageLayout::eUndefined;
152 }

## ◆ GetTextureSource()

std::shared_ptr< const TextureSourceVK > impeller::TextureVK::GetTextureSource | ( |  | ) | const

Definition at line 136 of file texture_vk.cc.

136 {
137 return source_;
138 }

Referenced by impeller::CommandEncoderVK::IsTracking(), and impeller::CommandEncoderVK::Track().

## ◆ SetLayout()

bool impeller::TextureVK::SetLayout | ( | const BarrierVK & | barrier | ) | const

Definition at line 140 of file texture_vk.cc.

140 {
141 return source_ ? source_->SetLayout(barrier).ok() : false;
142 }

Referenced by impeller::UpdateBindingLayouts().

## ◆ SetLayoutWithoutEncoding()

vk::ImageLayout impeller::TextureVK::SetLayoutWithoutEncoding | ( | vk::ImageLayout | layout | ) | const

Definition at line 144 of file texture_vk.cc.

145 {
146 return source_ ? source_->SetLayoutWithoutEncoding(layout)
147 : vk::ImageLayout::eUndefined;
148 }

The documentation for this class was generated from the following files:

- impeller/renderer/backend/vulkan/texture_vk.h
- impeller/renderer/backend/vulkan/texture_vk.cc

impeller::Texture::Texture
Texture(TextureDescriptor desc)
Definition: texture.cc:11