5#ifndef FLUTTER_DISPLAY_LIST_IMAGE_DL_IMAGE_H_
6#define FLUTTER_DISPLAY_LIST_IMAGE_DL_IMAGE_H_
16#include "third_party/skia/include/core/SkImage.h"
17#include "third_party/skia/include/core/SkRefCnt.h"
141 virtual std::optional<std::string>
get_error()
const;
147 bool Equals(
const sk_sp<const DlImage>& other)
const {
148 return Equals(other.get());
Represents an image whose allocation is (usually) resident on device memory.
bool Equals(const DlImage &other) const
virtual size_t GetApproximateByteSize() const =0
bool Equals(const sk_sp< const DlImage > &other) const
virtual const impeller::DlImageImpeller * asImpellerImage() const
Safe downcast to DlImageImpeller.
virtual DlISize GetSize() const =0
virtual bool isTextureBacked() const =0
Returns true if the image is backed by a GPU texture.
virtual std::optional< std::string > get_error() const
DlIRect GetBounds() const
Type
The backend type of this image.
virtual bool isOpaque() const =0
If the pixel format of this image ignores alpha, this returns true. This method might conservatively ...
virtual DlColorSpace GetColorSpace() const =0
Gets the color space of the image.
virtual Type GetImageType() const =0
Returns the backend type of this image.
bool Equals(const DlImage *other) const
virtual OwningContext owning_context() const
virtual bool isUIThreadSafe() const =0
If the underlying platform image held by this object has no threading requirements for the release of...
virtual const DlImageSkia * asSkiaImage() const
Safe downcast to DlImageSkia.