Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
Loading...
Searching...
No Matches
single_frame_codec.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef FLUTTER_LIB_UI_PAINTING_SINGLE_FRAME_CODEC_H_
6
#define FLUTTER_LIB_UI_PAINTING_SINGLE_FRAME_CODEC_H_
7
8
#include "
flutter/fml/macros.h
"
9
#include "
flutter/lib/ui/painting/codec.h
"
10
#include "
flutter/lib/ui/painting/image.h
"
11
#include "
flutter/lib/ui/painting/image_decoder.h
"
12
#include "
flutter/lib/ui/painting/image_descriptor.h
"
13
14
namespace
flutter
{
15
16
class
SingleFrameCodec
:
public
Codec
{
17
public
:
18
SingleFrameCodec
(
const
fml::RefPtr<ImageDescriptor>
& descriptor,
19
uint32_t target_width,
20
uint32_t target_height,
21
ImageDecoder::TargetPixelFormat
destination_format);
22
23
~SingleFrameCodec
()
override
;
24
25
// |Codec|
26
int
frameCount
()
const override
;
27
28
// |Codec|
29
int
repetitionCount
()
const override
;
30
31
// |Codec|
32
Dart_Handle
getNextFrame
(Dart_Handle
args
)
override
;
33
34
private
:
35
enum class
Status { kNew, kInProgress, kComplete };
36
Status status_ = Status::kNew;
37
fml::RefPtr<ImageDescriptor>
descriptor_;
38
uint32_t target_width_;
39
uint32_t target_height_;
40
ImageDecoder::TargetPixelFormat
target_format_;
41
fml::RefPtr<CanvasImage>
cached_image_;
42
std::vector<tonic::DartPersistentValue> pending_callbacks_;
43
44
FML_FRIEND_MAKE_REF_COUNTED
(
SingleFrameCodec
);
45
FML_FRIEND_REF_COUNTED_THREAD_SAFE
(
SingleFrameCodec
);
46
};
47
48
}
// namespace flutter
49
50
#endif
// FLUTTER_LIB_UI_PAINTING_SINGLE_FRAME_CODEC_H_
flutter::Codec
Definition
codec.h:19
flutter::ImageDecoder::TargetPixelFormat
TargetPixelFormat
Definition
image_decoder.h:37
flutter::SingleFrameCodec
Definition
single_frame_codec.h:16
flutter::SingleFrameCodec::~SingleFrameCodec
~SingleFrameCodec() override
flutter::SingleFrameCodec::frameCount
int frameCount() const override
Definition
single_frame_codec.cc:24
flutter::SingleFrameCodec::repetitionCount
int repetitionCount() const override
Definition
single_frame_codec.cc:28
flutter::SingleFrameCodec::getNextFrame
Dart_Handle getNextFrame(Dart_Handle args) override
Definition
single_frame_codec.cc:32
fml::RefPtr
Definition
ref_ptr.h:65
codec.h
args
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
Definition
fl_event_channel.h:89
macros.h
image_decoder.h
image_descriptor.h
image.h
flutter
Definition
asset_manager.cc:10
FML_FRIEND_REF_COUNTED_THREAD_SAFE
#define FML_FRIEND_REF_COUNTED_THREAD_SAFE(T)
Definition
ref_counted.h:126
FML_FRIEND_MAKE_REF_COUNTED
#define FML_FRIEND_MAKE_REF_COUNTED(T)
Definition
ref_counted.h:132
lib
ui
painting
single_frame_codec.h
Generated on Tue Dec 2 2025 04:46:40 for Flutter Engine Uber Docs by
1.9.8