Flutter Engine
Loading...
Searching...
No Matches
image_encoding.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_IMAGE_ENCODING_H_
6
#define FLUTTER_LIB_UI_PAINTING_IMAGE_ENCODING_H_
7
8
#include "
fml/status_or.h
"
9
#include "third_party/skia/include/core/SkImage.h"
10
#include "
third_party/tonic/dart_library_natives.h
"
11
12
namespace
flutter
{
13
14
class
CanvasImage;
15
16
// This must be kept in sync with the enum in painting.dart
17
enum
ImageByteFormat
{
18
kRawRGBA
,
19
kRawStraightRGBA
,
20
kRawUnmodified
,
21
kRawExtendedRgba128
,
22
kPNG
,
23
};
24
25
Dart_Handle
EncodeImage
(CanvasImage* canvas_image,
26
int
format,
27
Dart_Handle callback_handle);
28
29
fml::StatusOr<sk_sp<SkData>
>
EncodeImage
(
const
sk_sp<SkImage>& raster_image,
30
ImageByteFormat
format);
31
32
}
// namespace flutter
33
34
#endif
// FLUTTER_LIB_UI_PAINTING_IMAGE_ENCODING_H_
fml::StatusOr
Definition
status_or.h:32
dart_library_natives.h
flutter
Definition
asset_manager.cc:10
flutter::ImageByteFormat
ImageByteFormat
Definition
image_encoding.h:17
flutter::kRawUnmodified
@ kRawUnmodified
Definition
image_encoding.h:20
flutter::kRawStraightRGBA
@ kRawStraightRGBA
Definition
image_encoding.h:19
flutter::kRawExtendedRgba128
@ kRawExtendedRgba128
Definition
image_encoding.h:21
flutter::kPNG
@ kPNG
Definition
image_encoding.h:22
flutter::kRawRGBA
@ kRawRGBA
Definition
image_encoding.h:18
flutter::EncodeImage
Dart_Handle EncodeImage(CanvasImage *canvas_image, int format, Dart_Handle callback_handle)
Definition
image_encoding.cc:165
status_or.h
lib
ui
painting
image_encoding.h
Generated on Wed Nov 5 2025 21:33:14 for Flutter Engine by
1.9.8