Flutter Engine
The Flutter Engine
|
#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) |
Public Member Functions inherited from impeller::Texture | |
virtual | ~Texture () |
virtual void | SetLabel (std::string_view label)=0 |
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) |
virtual bool | IsValid () const =0 |
virtual ISize | GetSize () const =0 |
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 Public Member Functions inherited from impeller::BackendCast< TextureMTL, 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 | |
Protected Member Functions inherited from impeller::Texture | |
Texture (TextureDescriptor desc) | |
virtual bool | OnSetContents (const uint8_t *contents, size_t length, size_t slice)=0 |
virtual bool | OnSetContents (std::shared_ptr< const fml::Mapping > mapping, size_t slice)=0 |
Protected Attributes inherited from impeller::Texture | |
bool | mipmap_generated_ = false |
Definition at line 15 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 20 of file texture_mtl.h.
impeller::TextureMTL::TextureMTL | ( | TextureDescriptor | desc, |
const AcquireTextureProc & | aquire_proc, | ||
bool | wrapped = false , |
||
bool | drawable = false |
||
) |
Definition at line 20 of file texture_mtl.mm.
|
overridedefault |
|
static |
Definition at line 57 of file texture_mtl.mm.
bool impeller::TextureMTL::GenerateMipmap | ( | id< MTLBlitCommandEncoder > | encoder | ) |
Definition at line 132 of file texture_mtl.mm.
id< MTLTexture > impeller::TextureMTL::GetMTLTexture | ( | ) | const |
Definition at line 116 of file texture_mtl.mm.
bool impeller::TextureMTL::IsDrawable | ( | ) | const |
Whether or not this texture is wrapping a Metal drawable.
Definition at line 128 of file texture_mtl.mm.
|
overridevirtual |
Implements impeller::Texture.
Definition at line 120 of file texture_mtl.mm.
bool impeller::TextureMTL::IsWrapped | ( | ) | const |
Definition at line 124 of file texture_mtl.mm.
|
static |
Definition at line 40 of file texture_mtl.mm.