5#ifndef FLUTTER_LIB_UI_PAINTING_DISPLAY_LIST_DEFERRED_IMAGE_GPU_IMPELLER_H_
6#define FLUTTER_LIB_UI_PAINTING_DISPLAY_LIST_DEFERRED_IMAGE_GPU_IMPELLER_H_
26 static sk_sp<DlDeferredImageGPUImpeller>
Make(
27 std::unique_ptr<LayerTree> layer_tree,
31 static sk_sp<DlDeferredImageGPUImpeller>
Make(
32 sk_sp<DisplayList> display_list,
67 FML_FRIEND_TEST(testing::DlDeferredImageGPUImpeller, TrashesDisplayList);
69 class ImageWrapper final :
public std::enable_shared_from_this<ImageWrapper>,
74 static std::shared_ptr<ImageWrapper> Make(
75 sk_sp<DisplayList> display_list,
80 static std::shared_ptr<ImageWrapper> Make(
81 std::unique_ptr<LayerTree> layer_tree,
85 bool isTextureBacked()
const;
87 const std::shared_ptr<impeller::Texture>
texture()
const {
91 const DlISize size()
const {
return size_; }
93 std::optional<std::string> get_error();
96 FML_FRIEND_TEST(testing::DlDeferredImageGPUImpeller, TrashesDisplayList);
98 std::shared_ptr<impeller::Texture> texture_;
102 mutable std::mutex error_mutex_;
103 std::optional<std::string> error_;
112 void SnapshotDisplayList(
113 std::variant<sk_sp<DisplayList>, std::unique_ptr<LayerTree>>
content);
116 void OnGrContextCreated()
override;
119 void OnGrContextDestroyed()
override;
124 const std::shared_ptr<ImageWrapper> wrapper_;
126 explicit DlDeferredImageGPUImpeller(std::shared_ptr<ImageWrapper> wrapper);
size_t GetApproximateByteSize() const override
bool isUIThreadSafe() const override
If the underlying platform image held by this object has no threading requirements for the release of...
bool isTextureBacked() const override
bool isOpaque() const override
If the pixel format of this image ignores alpha, this returns true. This method might conservatively ...
OwningContext owning_context() const override
sk_sp< SkImage > skia_image() const override
If this display list image is meant to be used by the Skia backend, an SkImage instance....
std::shared_ptr< impeller::Texture > impeller_texture() const override
If this display list image is meant to be used by the Impeller backend, an Impeller texture instance....
static sk_sp< DlDeferredImageGPUImpeller > Make(std::unique_ptr< LayerTree > layer_tree, fml::TaskRunnerAffineWeakPtr< SnapshotDelegate > snapshot_delegate, fml::RefPtr< fml::TaskRunner > raster_task_runner)
~DlDeferredImageGPUImpeller() override
DlISize GetSize() const override
Represents an image whose allocation is (usually) resident on device memory.
fml::TaskRunnerAffineWeakPtr< SnapshotDelegate > snapshot_delegate_
#define FML_FRIEND_TEST(test_case_name, test_name)
#define FML_TEST_CLASS(test_case_name, test_name)
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
union flutter::testing::@2827::KeyboardChange::@78 content
impeller::ISize32 DlISize
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all 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