Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
compressed_image.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_IMPELLER_PLAYGROUND_IMAGE_COMPRESSED_IMAGE_H_
6#define FLUTTER_IMPELLER_PLAYGROUND_IMAGE_COMPRESSED_IMAGE_H_
7
8#include <memory>
9
10#include "flutter/fml/macros.h"
11#include "flutter/fml/mapping.h"
14
15namespace impeller {
16
17class ImageSource;
18
20 public:
22
23 [[nodiscard]] virtual DecompressedImage Decode() const = 0;
24
25 bool IsValid() const;
26
27 protected:
28 const std::shared_ptr<const fml::Mapping> source_;
29
30 explicit CompressedImage(std::shared_ptr<const fml::Mapping> allocation);
31};
32
33} // namespace impeller
34
35#endif // FLUTTER_IMPELLER_PLAYGROUND_IMAGE_COMPRESSED_IMAGE_H_
virtual DecompressedImage Decode() const =0
const std::shared_ptr< const fml::Mapping > source_