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"
11
12namespace flutter {
13
14class CanvasImage;
15
16// This must be kept in sync with the enum in painting.dart
24
25Dart_Handle EncodeImage(CanvasImage* canvas_image,
26 int format,
27 Dart_Handle callback_handle);
28
29fml::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_
@ kRawExtendedRgba128
Dart_Handle EncodeImage(CanvasImage *canvas_image, int format, Dart_Handle callback_handle)