Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
impeller::SamplerVK Class Referencefinal

#include <sampler_vk.h>

Inheritance diagram for impeller::SamplerVK:
impeller::Sampler impeller::BackendCast< SamplerVK, Sampler >

Public Member Functions

 SamplerVK (const vk::Device &device, const SamplerDescriptor &, std::shared_ptr< YUVConversionVK > yuv_conversion={})
 
 ~SamplerVK () override
 
vk::Sampler GetSampler () const
 
std::shared_ptr< SamplerVKCreateVariantForConversion (std::shared_ptr< YUVConversionVK > conversion) const
 
const std::shared_ptr< YUVConversionVK > & GetYUVConversion () const
 
- Public Member Functions inherited from impeller::Sampler
virtual ~Sampler ()
 
const SamplerDescriptorGetDescriptor () const
 

Additional Inherited Members

- Static Public Member Functions inherited from impeller::BackendCast< SamplerVK, Sampler >
static SamplerVKCast (Sampler &base)
 
static const SamplerVKCast (const Sampler &base)
 
static SamplerVKCast (Sampler *base)
 
static const SamplerVKCast (const Sampler *base)
 
- Protected Member Functions inherited from impeller::Sampler
 Sampler (const SamplerDescriptor &desc)
 
- Protected Attributes inherited from impeller::Sampler
SamplerDescriptor desc_
 

Detailed Description

Definition at line 18 of file sampler_vk.h.

Constructor & Destructor Documentation

◆ SamplerVK()

impeller::SamplerVK::SamplerVK ( const vk::Device &  device,
const SamplerDescriptor desc,
std::shared_ptr< YUVConversionVK yuv_conversion = {} 
)

Definition at line 107 of file sampler_vk.cc.

110 : Sampler(desc),
111 device_(device),
112 sampler_(MakeSharedVK<vk::Sampler>(
113 CreateSampler(device, desc_, yuv_conversion))),
114 yuv_conversion_(std::move(yuv_conversion)) {
115 is_valid_ = sampler_ && !!sampler_->Get();
116}
Sampler(const SamplerDescriptor &desc)
Definition sampler.cc:9
SamplerDescriptor desc_
Definition sampler.h:19
VkDevice device
Definition main.cc:69
static vk::UniqueSampler CreateSampler(const vk::Device &device, const SamplerDescriptor &desc, const std::shared_ptr< YUVConversionVK > &yuv_conversion)
Definition sampler_vk.cc:14

◆ ~SamplerVK()

impeller::SamplerVK::~SamplerVK ( )
overridedefault

Member Function Documentation

◆ CreateVariantForConversion()

std::shared_ptr< SamplerVK > impeller::SamplerVK::CreateVariantForConversion ( std::shared_ptr< YUVConversionVK conversion) const

Definition at line 124 of file sampler_vk.cc.

125 {
126 if (!conversion || !is_valid_) {
127 return nullptr;
128 }
129 return std::make_shared<SamplerVK>(device_, desc_, std::move(conversion));
130}

References impeller::Sampler::desc_.

Referenced by impeller::TextureVK::GetImmutableSamplerVariant().

◆ GetSampler()

vk::Sampler impeller::SamplerVK::GetSampler ( ) const

Definition at line 120 of file sampler_vk.cc.

120 {
121 return *sampler_;
122}

◆ GetYUVConversion()

const std::shared_ptr< YUVConversionVK > & impeller::SamplerVK::GetYUVConversion ( ) const

Definition at line 132 of file sampler_vk.cc.

132 {
133 return yuv_conversion_;
134}

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