5#include "flutter/lib/ui/painting/image_decoder.h"
7#include "flutter/lib/ui/painting/image_decoder_skia.h"
9#if IMPELLER_SUPPORTS_RENDERING
10#include "flutter/lib/ui/painting/image_decoder_impeller.h"
18 std::shared_ptr<fml::ConcurrentTaskRunner> concurrent_task_runner,
20 const std::shared_ptr<fml::SyncSwitch>& gpu_disabled_switch) {
21#if IMPELLER_SUPPORTS_RENDERING
23 return std::make_unique<ImageDecoderImpeller>(
25 std::move(concurrent_task_runner),
26 std::move(io_manager),
32 return std::make_unique<ImageDecoderSkia>(
34 std::move(concurrent_task_runner),
45 std::shared_ptr<fml::ConcurrentTaskRunner> concurrent_task_runner,
48 concurrent_task_runner_(
std::move(concurrent_task_runner)),
53 <<
"The image decoder must be created & collected on the UI thread.";
59 return weak_factory_.GetWeakPtr();
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::RefPtr< fml::TaskRunner > GetUITaskRunner() const
virtual bool RunsTasksOnCurrentThread()
fml::WeakPtr< IOManager > io_manager_
#define FML_LOG(severity)
#define FML_DCHECK(condition)