Flutter Engine
The Flutter Engine
|
Represents an image whose allocation is (usually) resident on device memory. More...
#include <dl_image.h>
Public Types | |
enum class | OwningContext { kRaster , kIO } |
Public Member Functions | |
virtual | ~DlImage () |
virtual sk_sp< SkImage > | skia_image () const =0 |
If this display list image is meant to be used by the Skia backend, an SkImage instance. Null otherwise. More... | |
virtual std::shared_ptr< impeller::Texture > | impeller_texture () const =0 |
If this display list image is meant to be used by the Impeller backend, an Impeller texture instance. Null otherwise. More... | |
virtual bool | isOpaque () const =0 |
If the pixel format of this image ignores alpha, this returns true. This method might conservatively return false when it cannot guarnatee an opaque image, for example when the pixel format of the image supports alpha but the image is made up of entirely opaque pixels. More... | |
virtual bool | isTextureBacked () const =0 |
virtual bool | isUIThreadSafe () const =0 |
If the underlying platform image held by this object has no threading requirements for the release of that image (or if arrangements have already been made to forward that image to the correct thread upon deletion), this method returns true. More... | |
virtual SkISize | dimensions () const =0 |
virtual size_t | GetApproximateByteSize () const =0 |
int | width () const |
int | height () const |
SkIRect | bounds () const |
virtual OwningContext | owning_context () const |
virtual std::optional< std::string > | get_error () const |
bool | Equals (const DlImage *other) const |
bool | Equals (const DlImage &other) const |
bool | Equals (const sk_sp< const DlImage > &other) const |
Public Member Functions inherited from SkRefCntBase | |
SkRefCntBase () | |
virtual | ~SkRefCntBase () |
bool | unique () const |
void | ref () const |
void | unref () const |
Static Public Member Functions | |
static sk_sp< DlImage > | Make (const SkImage *image) |
static sk_sp< DlImage > | Make (sk_sp< SkImage > image) |
Protected Member Functions | |
DlImage () | |
Represents an image whose allocation is (usually) resident on device memory.
Since it is usually impossible or expensive to transmute images for one rendering backend to another, these objects are backend specific.
Definition at line 30 of file dl_image.h.
|
strong |
|
virtualdefault |
|
protecteddefault |
SkIRect flutter::DlImage::bounds | ( | ) | const |
Definition at line 31 of file dl_image.cc.
|
pure virtual |
Implemented in flutter::DlImageSkia, impeller::DlImageImpeller, flutter::DlDeferredImageGPUImpeller, flutter::DlDeferredImageGPUSkia, and flutter::DlImageGPU.
|
inline |
Definition at line 132 of file dl_image.h.
|
inline |
Definition at line 121 of file dl_image.h.
Definition at line 134 of file dl_image.h.
|
virtual |
Reimplemented in flutter::DlDeferredImageGPUSkia.
Definition at line 35 of file dl_image.cc.
|
pure virtual |
Implemented in flutter::DlImageSkia, impeller::DlImageImpeller, flutter::DlDeferredImageGPUImpeller, flutter::DlDeferredImageGPUSkia, and flutter::DlImageGPU.
int flutter::DlImage::height | ( | ) | const |
Definition at line 27 of file dl_image.cc.
|
pure virtual |
If this display list image is meant to be used by the Impeller backend, an Impeller texture instance. Null otherwise.
Implemented in flutter::DlImageSkia, impeller::DlImageImpeller, flutter::DlDeferredImageGPUImpeller, flutter::DlDeferredImageGPUSkia, and flutter::DlImageGPU.
|
pure virtual |
If the pixel format of this image ignores alpha, this returns true. This method might conservatively return false when it cannot guarnatee an opaque image, for example when the pixel format of the image supports alpha but the image is made up of entirely opaque pixels.
Implemented in flutter::DlImageSkia, impeller::DlImageImpeller, flutter::DlDeferredImageGPUImpeller, flutter::DlDeferredImageGPUSkia, and flutter::DlImageGPU.
|
pure virtual |
|
pure virtual |
If the underlying platform image held by this object has no threading requirements for the release of that image (or if arrangements have already been made to forward that image to the correct thread upon deletion), this method returns true.
Implemented in flutter::DlImageSkia, impeller::DlImageImpeller, flutter::DlDeferredImageGPUImpeller, flutter::DlDeferredImageGPUSkia, and flutter::DlImageGPU.
Definition at line 11 of file dl_image.cc.
Definition at line 15 of file dl_image.cc.
|
inlinevirtual |
Reimplemented in impeller::DlImageImpeller, flutter::DlDeferredImageGPUImpeller, and flutter::DlDeferredImageGPUSkia.
Definition at line 114 of file dl_image.h.
If this display list image is meant to be used by the Skia backend, an SkImage instance. Null otherwise.
Implemented in flutter::DlImageSkia, impeller::DlImageImpeller, flutter::DlDeferredImageGPUImpeller, flutter::DlDeferredImageGPUSkia, and flutter::DlImageGPU.
int flutter::DlImage::width | ( | ) | const |
Definition at line 23 of file dl_image.cc.