5#ifndef FLUTTER_LIB_UI_SNAPSHOT_DELEGATE_H_
6#define FLUTTER_LIB_UI_SNAPSHOT_DELEGATE_H_
14#include "third_party/skia/include/core/SkImage.h"
15#include "third_party/skia/include/gpu/ganesh/GrBackendSurface.h"
16#include "third_party/skia/include/gpu/ganesh/GrContextThreadSafeProxy.h"
17#include "third_party/skia/include/gpu/ganesh/GrDirectContext.h"
36 const GrBackendTexture& p_texture,
38 sk_sp<GrDirectContext> p_context,
39 sk_sp<SkImage> p_image =
nullptr,
40 const std::string& p_error =
"")
70 sk_sp<DisplayList> display_list,
71 const SkImageInfo& image_info) = 0;
88 std::function<
void(sk_sp<SkImage>)>
callback,
92 sk_sp<DisplayList> display_list,
97 sk_sp<DisplayList> display_list,
99 std::function<
void(std::shared_ptr<impeller::Texture>)>
callback,
103 sk_sp<DisplayList> display_list,
108 sk_sp<SkImage>
image,
112 sk_sp<SkImage>
image,
121 const std::shared_ptr<impeller::RuntimeStage>& runtime_stage) = 0;
virtual bool MakeRenderContextCurrent()=0
virtual sk_sp< SkImage > MakeSkiaTextureImage(sk_sp< SkImage > image, SnapshotPixelFormat pixel_format)=0
virtual std::shared_ptr< TextureRegistry > GetTextureRegistry()=0
Gets the registry of external textures currently in use by the rasterizer. These textures may be upda...
virtual void MakeSkiaSnapshot(sk_sp< DisplayList > display_list, DlISize picture_size, std::function< void(sk_sp< SkImage >)> callback, SnapshotPixelFormat pixel_format)=0
virtual std::shared_ptr< impeller::Texture > MakeImpellerTextureImage(sk_sp< SkImage > image, SnapshotPixelFormat pixel_format)=0
virtual std::shared_ptr< impeller::Texture > MakeImpellerSnapshotSync(sk_sp< DisplayList > display_list, DlISize picture_size, SnapshotPixelFormat pixel_format)=0
virtual sk_sp< SkImage > ConvertToRasterImage(sk_sp< SkImage > image)=0
virtual GrDirectContext * GetGrContext()=0
virtual void MakeImpellerSnapshot(sk_sp< DisplayList > display_list, DlISize picture_size, std::function< void(std::shared_ptr< impeller::Texture >)> callback, SnapshotPixelFormat pixel_format)=0
virtual sk_sp< SkImage > MakeSkiaSnapshotSync(sk_sp< DisplayList > display_list, DlISize picture_size, SnapshotPixelFormat pixel_format)=0
virtual std::unique_ptr< GpuImageResult > MakeSkiaGpuImage(sk_sp< DisplayList > display_list, const SkImageInfo &image_info)=0
Attempts to create a GrBackendTexture for the specified DisplayList. May result in a raster bitmap if...
virtual void CacheRuntimeStage(const std::shared_ptr< impeller::RuntimeStage > &runtime_stage)=0
FlutterVulkanImage * image
FlutterDesktopBinaryReply callback
A data structure used by the Skia implementation of deferred GPU based images.
sk_sp< GrDirectContext > context
GpuImageResult(const GrBackendTexture &p_texture, sk_sp< GrDirectContext > p_context, sk_sp< SkImage > p_image=nullptr, const std::string &p_error="")
const GrBackendTexture texture