Flutter Engine
The Flutter Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
image_decoder_skia.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_DECODER_SKIA_H_
6#define FLUTTER_LIB_UI_PAINTING_IMAGE_DECODER_SKIA_H_
7
8#if !SLIMPELLER
9
10#include "flutter/fml/macros.h"
11#include "flutter/lib/ui/painting/image_decoder.h"
12
13namespace flutter {
14
15class ImageDecoderSkia final : public ImageDecoder {
16 public:
18 const TaskRunners& runners,
19 std::shared_ptr<fml::ConcurrentTaskRunner> concurrent_task_runner,
20 fml::WeakPtr<IOManager> io_manager);
21
23
24 // |ImageDecoder|
26 uint32_t target_width,
27 uint32_t target_height,
28 const ImageResult& result) override;
29
31 ImageDescriptor* descriptor,
32 uint32_t target_width,
33 uint32_t target_height,
34 const fml::tracing::TraceFlow& flow);
35
36 private:
37 FML_DISALLOW_COPY_AND_ASSIGN(ImageDecoderSkia);
38};
39
40} // namespace flutter
41
42#endif // !SLIMPELLER
43
44#endif // FLUTTER_LIB_UI_PAINTING_IMAGE_DECODER_SKIA_H_
ImageDecoderSkia(const TaskRunners &runners, std::shared_ptr< fml::ConcurrentTaskRunner > concurrent_task_runner, fml::WeakPtr< IOManager > io_manager)
void Decode(fml::RefPtr< ImageDescriptor > descriptor, uint32_t target_width, uint32_t target_height, const ImageResult &result) override
static sk_sp< SkImage > ImageFromCompressedData(ImageDescriptor *descriptor, uint32_t target_width, uint32_t target_height, const fml::tracing::TraceFlow &flow)
std::function< void(sk_sp< DlImage >, std::string)> ImageResult
Definition: image_decoder.h:35
Creates an image descriptor for encoded or decoded image data, describing the width,...
GAsyncResult * result