Flutter Engine
 
Loading...
Searching...
No Matches
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"
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
30 static sk_sp<SkImage> ImageFromCompressedData(
31 ImageDescriptor* descriptor,
32 uint32_t target_width,
33 uint32_t target_height,
34 const fml::tracing::TraceFlow& flow);
35
36 private:
38};
39
40} // namespace flutter
41
42#endif // !SLIMPELLER
43
44#endif // FLUTTER_LIB_UI_PAINTING_IMAGE_DECODER_SKIA_H_
std::function< void(sk_sp< DlImage >, std::string)> ImageResult
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)
Creates an image descriptor for encoded or decoded image data, describing the width,...
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27