5#ifndef FLUTTER_SHELL_PLATFORM_ANDROID_ANDROID_IMAGE_GENERATOR_H_
6#define FLUTTER_SHELL_PLATFORM_ANDROID_ANDROID_IMAGE_GENERATOR_H_
10#include "flutter/fml/memory/ref_ptr.h"
11#include "flutter/fml/synchronization/waitable_event.h"
12#include "flutter/fml/task_runner.h"
13#include "flutter/lib/ui/painting/image_generator.h"
35 unsigned int frame_index)
override;
44 unsigned int frame_index,
45 std::optional<unsigned int> prior_frame)
override;
57 jlong generator_pointer,
76 bool IsValidImageData();
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.
static std::shared_ptr< ImageGenerator > MakeFromData(sk_sp< SkData > data, const fml::RefPtr< fml::TaskRunner > &task_runner)
static bool Register(JNIEnv *env)
unsigned int GetFrameCount() const override
Get the number of frames that the encoded image stores. This method is always expected to be called b...
const SkImageInfo & GetInfo() override
Returns basic information about the contents of the encoded image. This information can almost always...
static void NativeImageHeaderCallback(JNIEnv *env, jclass jcaller, jlong generator_pointer, int width, int height)
bool GetPixels(const SkImageInfo &info, void *pixels, size_t row_bytes, unsigned int frame_index, std::optional< unsigned int > prior_frame) override
Decode the image into a given buffer. This method is currently always used for sub-pixel image decodi...
SkISize GetScaledDimensions(float desired_scale) override
Given a scale value, find the closest image size that can be used for efficiently decoding the image....
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 ...
The minimal interface necessary for defining a decoder that can be used for both single and multi-fra...
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.