#include <texture_mtl.h>
Public Types | |
using | AcquireTextureProc = std::function< id< MTLTexture >()> |
This callback needs to always return the same texture when called multiple times. More... | |
Public Member Functions | |
TextureMTL (TextureDescriptor desc, const AcquireTextureProc &aquire_proc, bool wrapped=false, bool drawable=false) | |
~TextureMTL () override | |
id< MTLTexture > | GetMTLTexture () const |
bool | IsWrapped () const |
bool | IsDrawable () const |
Whether or not this texture is wrapping a Metal drawable. More... | |
bool | IsValid () const override |
bool | GenerateMipmap (id< MTLBlitCommandEncoder > encoder) |
![]() | |
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 |
Static Public Member Functions | |
static std::shared_ptr< TextureMTL > | Wrapper (TextureDescriptor desc, id< MTLTexture > texture, std::function< void()> deletion_proc=nullptr) |
static std::shared_ptr< TextureMTL > | Create (TextureDescriptor desc, id< MTLTexture > texture) |
![]() | |
static TextureMTL & | Cast (Texture &base) |
static const TextureMTL & | Cast (const Texture &base) |
static TextureMTL * | Cast (Texture *base) |
static const TextureMTL * | Cast (const Texture *base) |
Additional Inherited Members | |
![]() | |
Texture (TextureDescriptor desc) | |
![]() | |
bool | mipmap_generated_ = false |
Definition at line 16 of file texture_mtl.h.
using impeller::TextureMTL::AcquireTextureProc = std::function<id<MTLTexture>()> |
This callback needs to always return the same texture when called multiple times.
Definition at line 21 of file texture_mtl.h.
impeller::TextureMTL::TextureMTL | ( | TextureDescriptor | desc, |
const AcquireTextureProc & | aquire_proc, | ||
bool | wrapped = false , |
||
bool | drawable = false |
||
) |
Definition at line 22 of file texture_mtl.mm.
References impeller::Texture::GetTextureDescriptor(), impeller::TextureDescriptor::IsValid(), impeller::TextureDescriptor::size, and VALIDATION_LOG.
Referenced by Wrapper().
|
override |
Definition at line 64 of file texture_mtl.mm.
References impeller::TextureDescriptor::GetByteSizeOfBaseMipLevel(), impeller::Texture::GetTextureDescriptor(), impeller::kDeviceTransient, and impeller::TextureDescriptor::storage_mode.
|
static |
Definition at line 59 of file texture_mtl.mm.
Referenced by impeller::WrapTextureWithRenderTarget().
bool impeller::TextureMTL::GenerateMipmap | ( | id< MTLBlitCommandEncoder > | encoder | ) |
id< MTLTexture > impeller::TextureMTL::GetMTLTexture | ( | ) | const |
Definition at line 147 of file texture_mtl.mm.
Referenced by impeller::ConfigureAttachment(), and impeller::ConfigureResolveTextureAttachment().
bool impeller::TextureMTL::IsDrawable | ( | ) | const |
Whether or not this texture is wrapping a Metal drawable.
Definition at line 159 of file texture_mtl.mm.
|
overridevirtual |
Implements impeller::Texture.
Definition at line 151 of file texture_mtl.mm.
bool impeller::TextureMTL::IsWrapped | ( | ) | const |
Definition at line 155 of file texture_mtl.mm.
|
static |
Definition at line 42 of file texture_mtl.mm.
References TextureMTL().
Referenced by impeller::SurfaceMTL::MakeFromTexture(), impeller::WrapperMTL(), and impeller::WrapTextureMTL().