#include <texture.h>
Public Member Functions | |
| virtual | ~Texture () |
| virtual void | SetLabel (std::string_view label)=0 |
| Label this resource for inspection in GPU debugging tools. | |
| virtual void | SetLabel (std::string_view label, std::string_view trailing)=0 |
| Label this resource for inspection in GPU debugging tools, with label and trailing will be concatenated together. | |
| 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 |
| bool | NeedsMipmapGeneration () const |
Protected Member Functions | |
| 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 | |
| bool | mipmap_generated_ = false |
|
virtualdefault |
|
explicitprotected |
Definition at line 11 of file texture.cc.
| size_t impeller::Texture::GetMipCount | ( | ) | const |
Definition at line 51 of file texture.cc.
References GetTextureDescriptor(), and impeller::TextureDescriptor::mip_count.
|
pure virtual |
Implemented in impeller::TestImpellerTexture, and impeller::TextureVK.
| const TextureDescriptor & impeller::Texture::GetTextureDescriptor | ( | ) | const |
Definition at line 55 of file texture.cc.
Referenced by impeller::TextureGLES::Bind(), impeller::BlitCopyBufferToTextureCommandGLES::Encode(), impeller::TextureGLES::GenerateMipmap(), GetMipCount(), impeller::TestImpellerTexture::GetSize(), impeller::TextureVK::GetSize(), impeller::TextureGLES::SetAsFramebufferAttachment(), impeller::TextureMTL::TextureMTL(), and impeller::TextureMTL::~TextureMTL().
| bool impeller::Texture::IsOpaque | ( | ) | const |
Definition at line 47 of file texture.cc.
|
pure virtual |
Implemented in impeller::TextureGLES, impeller::TextureMTL, and impeller::TestImpellerTexture.
| bool impeller::Texture::NeedsMipmapGeneration | ( | ) | const |
Returns true if mipmaps have never been generated. The contents of the mipmap may be out of date if the root texture has been modified and the mipmaps hasn't been regenerated.
Definition at line 71 of file texture.cc.
References impeller::TextureDescriptor::mip_count, and mipmap_generated_.
|
protectedpure virtual |
Implemented in impeller::TestImpellerTexture.
Referenced by SetContents(), and SetContents().
|
protectedpure virtual |
Implemented in impeller::TestImpellerTexture.
| bool impeller::Texture::SetContents | ( | const uint8_t * | contents, |
| size_t | length, | ||
| size_t | slice = 0, |
||
| bool | is_opaque = false |
||
| ) |
Definition at line 15 of file texture.cc.
References length, OnSetContents(), and VALIDATION_LOG.
| bool impeller::Texture::SetContents | ( | std::shared_ptr< const fml::Mapping > | mapping, |
| size_t | slice = 0, |
||
| bool | is_opaque = false |
||
| ) |
Definition at line 30 of file texture.cc.
References OnSetContents(), and VALIDATION_LOG.
|
pure virtual |
Label this resource for inspection in GPU debugging tools.
This functionality may be disabled in release builds.
Implemented in impeller::TestImpellerTexture.
|
pure virtual |
Label this resource for inspection in GPU debugging tools, with label and trailing will be concatenated together.
This functionality may be disabled in release builds.
Implemented in impeller::TestImpellerTexture.
|
protected |
Definition at line 69 of file texture.h.
Referenced by impeller::TextureGLES::GenerateMipmap(), impeller::TextureMTL::GenerateMipmap(), NeedsMipmapGeneration(), and impeller::TextureVK::SetMipMapGenerated().