5#ifndef FLUTTER_LIB_UI_PAINTING_IMAGE_DECODER_H_
6#define FLUTTER_LIB_UI_PAINTING_IMAGE_DECODER_H_
10#include "flutter/common/settings.h"
11#include "flutter/common/task_runners.h"
12#include "flutter/display_list/image/dl_image.h"
13#include "flutter/fml/concurrent_message_loop.h"
14#include "flutter/lib/ui/io_manager.h"
15#include "flutter/lib/ui/painting/image_descriptor.h"
26 static std::unique_ptr<ImageDecoder>
Make(
29 std::shared_ptr<fml::ConcurrentTaskRunner> concurrent_task_runner,
31 const std::shared_ptr<fml::SyncSwitch>& gpu_disabled_switch);
43 uint32_t target_width,
44 uint32_t target_height,
56 std::shared_ptr<fml::ConcurrentTaskRunner> concurrent_task_runner,
std::function< void(sk_sp< DlImage >, std::string)> ImageResult
virtual void Decode(fml::RefPtr< ImageDescriptor > descriptor, uint32_t target_width, uint32_t target_height, const ImageResult &result)=0
std::shared_ptr< fml::ConcurrentTaskRunner > concurrent_task_runner_
ImageDecoder(const TaskRunners &runners, std::shared_ptr< fml::ConcurrentTaskRunner > concurrent_task_runner, fml::WeakPtr< IOManager > io_manager)
fml::WeakPtr< ImageDecoder > GetWeakPtr() const
static std::unique_ptr< ImageDecoder > Make(const Settings &settings, const TaskRunners &runners, std::shared_ptr< fml::ConcurrentTaskRunner > concurrent_task_runner, fml::WeakPtr< IOManager > io_manager, const std::shared_ptr< fml::SyncSwitch > &gpu_disabled_switch)
fml::WeakPtr< IOManager > io_manager_
Dart_NativeFunction function