#include <image_encoding_impeller.h>
Static Public Member Functions | |
| static int | GetColorSpace (const std::shared_ptr< impeller::Texture > &texture) |
| static void | ConvertDlImageToSkImage (const sk_sp< DlImage > &dl_image, std::function< void(fml::StatusOr< sk_sp< SkImage > >)> encode_task, const fml::TaskRunnerAffineWeakPtr< SnapshotDelegate > &snapshot_delegate, const std::shared_ptr< impeller::Context > &impeller_context) |
| static void | ConvertImageToRaster (const sk_sp< DlImage > &dl_image, std::function< void(fml::StatusOr< sk_sp< SkImage > >)> encode_task, const fml::RefPtr< fml::TaskRunner > &raster_task_runner, const fml::RefPtr< fml::TaskRunner > &io_task_runner, const fml::TaskRunnerAffineWeakPtr< SnapshotDelegate > &snapshot_delegate, const std::shared_ptr< const fml::SyncSwitch > &is_gpu_disabled_sync_switch, const std::shared_ptr< impeller::Context > &impeller_context) |
Definition at line 21 of file image_encoding_impeller.h.
|
static |
Converts a DlImage to a SkImage. This should be called from the thread that corresponds to dl_image->owning_context() when gpu access is guaranteed. See also: ConvertImageToRaster. Visible for testing.
Definition at line 135 of file image_encoding_impeller.cc.
References flutter::buffer, color_type, FML_LOG, impeller::CommandBuffer::kCompleted, fml::kFailedPrecondition, impeller::kHostVisible, fml::kUnimplemented, fml::kUnknown, impeller::DeviceBufferDescriptor::readback, impeller::DeviceBufferDescriptor::size, impeller::DeviceBufferDescriptor::storage_mode, texture, and flutter::ToSkISize().
|
static |
Converts a DlImage to a SkImage. encode_task is executed with the resulting SkImage.
Definition at line 222 of file image_encoding_impeller.cc.
References image, flutter::DlImage::kRaster, and fml::TaskRunner::RunNowOrPostTask().
|
static |
Definition at line 257 of file image_encoding_impeller.cc.
References impeller::TextureDescriptor::format, impeller::kB10G10R10XR, flutter::kExtendedSRGB, impeller::kR16G16B16A16Float, flutter::kSRGB, and texture.
Referenced by flutter::CanvasImage::colorSpace().