12#if FML_OS_IOS_SIMULATOR
14 OwningContext owning_context,
16 if (!
texture && !is_fake_image) {
19 return sk_sp<DlImageImpeller>(
28 return sk_sp<DlImageImpeller>(
35 std::shared_ptr<Texture> y_texture,
36 std::shared_ptr<Texture> uv_texture,
38 if (!aiks_context || !y_texture || !uv_texture) {
42 std::move(y_texture), std::move(uv_texture), yuv_color_space);
51 [&] { renderer.GetRenderTargetCache()->EnableCache(); });
53 std::optional<Snapshot> snapshot =
54 yuv_to_rgb_filter_contents->RenderToSnapshot(
56 {.coverage_limit = std::nullopt,
57 .sampler_descriptor = std::nullopt,
60 .label =
"MakeYUVToRGBFilter Snapshot"});
61 if (!snapshot.has_value()) {
67DlImageImpeller::DlImageImpeller(std::shared_ptr<Texture>
texture,
68 OwningContext owning_context
69#ifdef FML_OS_IOS_SIMULATOR
75 owning_context_(owning_context)
76#ifdef FML_OS_IOS_SIMULATOR
78 is_fake_image_(is_fake_image)
123 auto size =
sizeof(*this);
125 size += texture_->GetTextureDescriptor().GetByteSizeOfBaseMipLevel();
Wraps a closure that is invoked in the destructor unless released by the caller.
ContentContext & GetContentContext() const
const std::shared_ptr< RenderTargetAllocator > & GetRenderTargetCache() const
size_t GetApproximateByteSize() const override
static sk_sp< DlImageImpeller > MakeFromYUVTextures(AiksContext *aiks_context, std::shared_ptr< Texture > y_texture, std::shared_ptr< Texture > uv_texture, YUVColorSpace yuv_color_space)
bool isTextureBacked() const override
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< DlImageImpeller > Make(std::shared_ptr< Texture > texture, OwningContext owning_context=OwningContext::kIO)
flutter::DlISize GetSize() 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....
~DlImageImpeller() override
bool isUIThreadSafe() const override
If the underlying platform image held by this object has no threading requirements for the release of...
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
void SetBlendMode(BlendMode blend_mode)
static std::shared_ptr< FilterContents > MakeYUVToRGBFilter(std::shared_ptr< Texture > y_texture, std::shared_ptr< Texture > uv_texture, YUVColorSpace yuv_color_space)
impeller::ISize32 DlISize