21 static sk_sp<DlDeferredImageGPUImpeller>
Make(
22 std::unique_ptr<LayerTree> layer_tree,
26 static sk_sp<DlDeferredImageGPUImpeller>
Make(
27 sk_sp<DisplayList> display_list,
62 class ImageWrapper final :
public std::enable_shared_from_this<ImageWrapper>,
67 static std::shared_ptr<ImageWrapper> Make(
68 sk_sp<DisplayList> display_list,
73 static std::shared_ptr<ImageWrapper> Make(
74 std::unique_ptr<LayerTree> layer_tree,
78 bool isTextureBacked()
const;
80 const std::shared_ptr<impeller::Texture>
texture()
const {
84 const DlISize size()
const {
return size_; }
86 std::optional<std::string> get_error();
90 sk_sp<DisplayList> display_list_;
91 std::shared_ptr<impeller::Texture> texture_;
94 std::shared_ptr<TextureRegistry> texture_registry_;
96 mutable std::mutex error_mutex_;
97 std::optional<std::string> error_;
100 sk_sp<DisplayList> display_list,
109 void SnapshotDisplayList(std::unique_ptr<LayerTree> layer_tree =
nullptr);
112 void OnGrContextCreated()
override;
115 void OnGrContextDestroyed()
override;
120 const std::shared_ptr<ImageWrapper> wrapper_;
122 explicit DlDeferredImageGPUImpeller(std::shared_ptr<ImageWrapper> wrapper);