Flutter Engine
The Flutter Engine
Classes | Public Member Functions | Static Public Member Functions | List of all members
flutter::DlDeferredImageGPUImpeller Class Referencefinal

#include <display_list_deferred_image_gpu_impeller.h>

Inheritance diagram for flutter::DlDeferredImageGPUImpeller:
flutter::DlImage SkRefCnt SkRefCntBase

Public Member Functions

 ~DlDeferredImageGPUImpeller () override
 
sk_sp< SkImageskia_image () const override
 If this display list image is meant to be used by the Skia backend, an SkImage instance. Null otherwise. More...
 
std::shared_ptr< impeller::Textureimpeller_texture () const override
 If this display list image is meant to be used by the Impeller backend, an Impeller texture instance. Null otherwise. More...
 
bool isOpaque () const override
 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...
 
bool isTextureBacked () const override
 
bool isUIThreadSafe () const override
 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...
 
SkISize dimensions () const override
 
size_t GetApproximateByteSize () const override
 
OwningContext owning_context () const override
 
- Public Member Functions inherited from flutter::DlImage
virtual ~DlImage ()
 
virtual sk_sp< SkImageskia_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::Textureimpeller_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< DlDeferredImageGPUImpellerMake (std::unique_ptr< LayerTree > layer_tree, fml::TaskRunnerAffineWeakPtr< SnapshotDelegate > snapshot_delegate, fml::RefPtr< fml::TaskRunner > raster_task_runner)
 
static sk_sp< DlDeferredImageGPUImpellerMake (sk_sp< DisplayList > display_list, const SkISize &size, fml::TaskRunnerAffineWeakPtr< SnapshotDelegate > snapshot_delegate, fml::RefPtr< fml::TaskRunner > raster_task_runner)
 
- Static Public Member Functions inherited from flutter::DlImage
static sk_sp< DlImageMake (const SkImage *image)
 
static sk_sp< DlImageMake (sk_sp< SkImage > image)
 

Additional Inherited Members

- Public Types inherited from flutter::DlImage
enum class  OwningContext { kRaster , kIO }
 
- Protected Member Functions inherited from flutter::DlImage
 DlImage ()
 

Detailed Description

Definition at line 19 of file display_list_deferred_image_gpu_impeller.h.

Constructor & Destructor Documentation

◆ ~DlDeferredImageGPUImpeller()

flutter::DlDeferredImageGPUImpeller::~DlDeferredImageGPUImpeller ( )
overridedefault

Member Function Documentation

◆ dimensions()

SkISize flutter::DlDeferredImageGPUImpeller::dimensions ( ) const
overridevirtual
Returns
The dimensions of the pixel grid.

Implements flutter::DlImage.

Definition at line 72 of file display_list_deferred_image_gpu_impeller.cc.

72 {
73 if (!wrapper_) {
74 return SkISize::MakeEmpty();
75 }
76 return wrapper_->size();
77}
static constexpr SkISize MakeEmpty()
Definition: SkSize.h:22

◆ GetApproximateByteSize()

size_t flutter::DlDeferredImageGPUImpeller::GetApproximateByteSize ( ) const
overridevirtual
Returns
The approximate byte size of the allocation of this image. This takes into account details such as mip-mapping. The allocation is usually resident in device memory.

Implements flutter::DlImage.

Definition at line 80 of file display_list_deferred_image_gpu_impeller.cc.

80 {
81 auto size = sizeof(DlDeferredImageGPUImpeller);
82 if (wrapper_) {
83 if (wrapper_->texture()) {
84 size += wrapper_->texture()
85 ->GetTextureDescriptor()
86 .GetByteSizeOfBaseMipLevel();
87 } else {
88 size += wrapper_->size().width() * wrapper_->size().height() * 4;
89 }
90 }
91 return size;
92}
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259

◆ impeller_texture()

std::shared_ptr< impeller::Texture > flutter::DlDeferredImageGPUImpeller::impeller_texture ( ) const
overridevirtual

If this display list image is meant to be used by the Impeller backend, an Impeller texture instance. Null otherwise.

Returns
An Impeller texture instance or null.

Implements flutter::DlImage.

Definition at line 48 of file display_list_deferred_image_gpu_impeller.cc.

48 {
49 if (!wrapper_) {
50 return nullptr;
51 }
52 return wrapper_->texture();
53}

◆ isOpaque()

bool flutter::DlDeferredImageGPUImpeller::isOpaque ( ) const
overridevirtual

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.

Returns
True if the pixel format of this image ignores alpha.

Implements flutter::DlImage.

Definition at line 56 of file display_list_deferred_image_gpu_impeller.cc.

56 {
57 // Impeller doesn't currently implement opaque alpha types.
58 return false;
59}

◆ isTextureBacked()

bool flutter::DlDeferredImageGPUImpeller::isTextureBacked ( ) const
overridevirtual

Implements flutter::DlImage.

Definition at line 62 of file display_list_deferred_image_gpu_impeller.cc.

62 {
63 return wrapper_ && wrapper_->isTextureBacked();
64}

◆ isUIThreadSafe()

bool flutter::DlDeferredImageGPUImpeller::isUIThreadSafe ( ) const
overridevirtual

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.

Returns
True if the underlying image is held in a thread-safe manner.

Implements flutter::DlImage.

Definition at line 67 of file display_list_deferred_image_gpu_impeller.cc.

67 {
68 return true;
69}

◆ Make() [1/2]

sk_sp< DlDeferredImageGPUImpeller > flutter::DlDeferredImageGPUImpeller::Make ( sk_sp< DisplayList display_list,
const SkISize size,
fml::TaskRunnerAffineWeakPtr< SnapshotDelegate snapshot_delegate,
fml::RefPtr< fml::TaskRunner raster_task_runner 
)
static

Definition at line 23 of file display_list_deferred_image_gpu_impeller.cc.

27 {
28 return sk_sp<DlDeferredImageGPUImpeller>(new DlDeferredImageGPUImpeller(
30 std::move(display_list), size, std::move(snapshot_delegate),
31 std::move(raster_task_runner))));
32}
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)

◆ Make() [2/2]

sk_sp< DlDeferredImageGPUImpeller > flutter::DlDeferredImageGPUImpeller::Make ( std::unique_ptr< LayerTree layer_tree,
fml::TaskRunnerAffineWeakPtr< SnapshotDelegate snapshot_delegate,
fml::RefPtr< fml::TaskRunner raster_task_runner 
)
static

Definition at line 13 of file display_list_deferred_image_gpu_impeller.cc.

16 {
17 return sk_sp<DlDeferredImageGPUImpeller>(new DlDeferredImageGPUImpeller(
19 std::move(layer_tree), std::move(snapshot_delegate),
20 std::move(raster_task_runner))));
21}

◆ owning_context()

OwningContext flutter::DlDeferredImageGPUImpeller::owning_context ( ) const
inlineoverridevirtual
Returns
Specifies which context was used to create this image. The image must be collected on the same task runner as its context.

Reimplemented from flutter::DlImage.

Definition at line 57 of file display_list_deferred_image_gpu_impeller.h.

◆ skia_image()

sk_sp< SkImage > flutter::DlDeferredImageGPUImpeller::skia_image ( ) const
overridevirtual

If this display list image is meant to be used by the Skia backend, an SkImage instance. Null otherwise.

Returns
A Skia image instance or null.

Implements flutter::DlImage.

Definition at line 42 of file display_list_deferred_image_gpu_impeller.cc.

42 {
43 return nullptr;
44};

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