5#ifndef FLUTTER_LIB_UI_PAINTING_IMAGE_GENERATOR_H_
6#define FLUTTER_LIB_UI_PAINTING_IMAGE_GENERATOR_H_
9#include "flutter/fml/macros.h"
135 unsigned int frame_index = 0,
136 std::optional<unsigned int> prior_frame = std::nullopt) = 0;
149 std::unique_ptr<SkImageGenerator> generator);
162 unsigned int frame_index)
override;
172 unsigned int frame_index = 0,
173 std::optional<unsigned int> prior_frame = std::nullopt)
override;
176 std::unique_ptr<SkImageGenerator> generator);
180 std::unique_ptr<SkImageGenerator> generator_;
202 unsigned int frame_index)
override;
212 unsigned int frame_index = 0,
213 std::optional<unsigned int> prior_frame = std::nullopt)
override;
219 std::unique_ptr<SkCodec> codec_;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
unsigned int GetPlayCount() const override
The number of times an animated image should play through before playback stops.
unsigned int GetFrameCount() const override
Get the number of frames that the encoded image stores. This method is always expected to be called b...
bool GetPixels(const SkImageInfo &info, void *pixels, size_t row_bytes, unsigned int frame_index=0, std::optional< unsigned int > prior_frame=std::nullopt) override
Decode the image into a given buffer. This method is currently always used for sub-pixel image decodi...
const ImageGenerator::FrameInfo GetFrameInfo(unsigned int frame_index) override
Get information about a single frame in the context of a multi-frame image, useful for animation and ...
~BuiltinSkiaCodecImageGenerator()
BuiltinSkiaCodecImageGenerator(std::unique_ptr< SkCodec > codec)
const SkImageInfo & GetInfo() override
Returns basic information about the contents of the encoded image. This information can almost always...
static std::unique_ptr< ImageGenerator > MakeFromData(sk_sp< SkData > data)
SkISize GetScaledDimensions(float desired_scale) override
Given a scale value, find the closest image size that can be used for efficiently decoding the image....
SkISize GetScaledDimensions(float desired_scale) override
Given a scale value, find the closest image size that can be used for efficiently decoding the image....
unsigned int GetPlayCount() const override
The number of times an animated image should play through before playback stops.
const SkImageInfo & GetInfo() override
Returns basic information about the contents of the encoded image. This information can almost always...
const ImageGenerator::FrameInfo GetFrameInfo(unsigned int frame_index) override
Get information about a single frame in the context of a multi-frame image, useful for animation and ...
bool GetPixels(const SkImageInfo &info, void *pixels, size_t row_bytes, unsigned int frame_index=0, std::optional< unsigned int > prior_frame=std::nullopt) override
Decode the image into a given buffer. This method is currently always used for sub-pixel image decodi...
unsigned int GetFrameCount() const override
Get the number of frames that the encoded image stores. This method is always expected to be called b...
BuiltinSkiaImageGenerator(std::unique_ptr< SkImageGenerator > generator)
static std::unique_ptr< ImageGenerator > MakeFromGenerator(std::unique_ptr< SkImageGenerator > generator)
~BuiltinSkiaImageGenerator()
The minimal interface necessary for defining a decoder that can be used for both single and multi-fra...
virtual ~ImageGenerator()
static const unsigned int kInfinitePlayCount
Frame count value to denote infinite looping.
sk_sp< SkImage > GetImage()
Creates an SkImage based on the current ImageInfo of this ImageGenerator.
virtual SkISize GetScaledDimensions(float scale)=0
Given a scale value, find the closest image size that can be used for efficiently decoding the image....
virtual const SkImageInfo & GetInfo()=0
Returns basic information about the contents of the encoded image. This information can almost always...
virtual unsigned int GetFrameCount() const =0
Get the number of frames that the encoded image stores. This method is always expected to be called b...
virtual const FrameInfo GetFrameInfo(unsigned int frame_index)=0
Get information about a single frame in the context of a multi-frame image, useful for animation and ...
virtual unsigned int GetPlayCount() const =0
The number of times an animated image should play through before playback stops.
virtual bool GetPixels(const SkImageInfo &info, void *pixels, size_t row_bytes, unsigned int frame_index=0, std::optional< unsigned int > prior_frame=std::nullopt)=0
Decode the image into a given buffer. This method is currently always used for sub-pixel image decodi...
static float max(float r, float g, float b)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Info about a single frame in the context of a multi-frame image, useful for animation and blending.
SkCodecAnimation::DisposalMethod disposal_method
How this frame should be modified before decoding the next one.
std::optional< unsigned int > required_frame
std::optional< SkIRect > disposal_rect
The region of the frame that is affected by the disposal method.
SkCodecAnimation::Blend blend_mode
How this frame should be blended with the previous frame.