5#ifndef FLUTTER_LIB_UI_PAINTING_MULTI_FRAME_CODEC_H_
6#define FLUTTER_LIB_UI_PAINTING_MULTI_FRAME_CODEC_H_
8#include "flutter/fml/macros.h"
9#include "flutter/lib/ui/painting/codec.h"
10#include "flutter/lib/ui/painting/image_generator.h"
42 explicit State(std::shared_ptr<ImageGenerator> generator);
44 const std::shared_ptr<ImageGenerator> generator_;
45 const int frameCount_;
46 const int repetitionCount_;
47 bool is_impeller_enabled_ =
false;
52 int nextFrameIndex_ = 0;
54 std::optional<SkBitmap> lastRequiredFrame_;
56 int lastRequiredFrameIndex_ = -1;
60 std::optional<SkIRect> restoreBGColorRect_;
62 std::pair<sk_sp<DlImage>, std::string> GetNextFrameImage(
64 const std::shared_ptr<const fml::SyncSwitch>& gpu_disable_sync_switch,
65 const std::shared_ptr<impeller::Context>& impeller_context,
68 void GetNextFrameAndInvokeCallback(
69 std::unique_ptr<tonic::DartPersistentValue>
callback,
73 const std::shared_ptr<const fml::SyncSwitch>& gpu_disable_sync_switch,
75 const std::shared_ptr<impeller::Context>& impeller_context);
79 std::shared_ptr<State> state_;
~MultiFrameCodec() override
int repetitionCount() const override
int frameCount() const override
MultiFrameCodec(std::shared_ptr< ImageGenerator > generator)
Dart_Handle getNextFrame(Dart_Handle args) override
struct _Dart_Handle * Dart_Handle
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback