Flutter Impeller
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/mapping.h"
12 
13 namespace impeller {
14 
15 class ImageSource;
16 
18  public:
19  virtual ~CompressedImage();
20 
21  [[nodiscard]] virtual DecompressedImage Decode() const = 0;
22 
23  bool IsValid() const;
24 
25  protected:
26  const std::shared_ptr<const fml::Mapping> source_;
27 
28  explicit CompressedImage(std::shared_ptr<const fml::Mapping> allocation);
29 };
30 
31 } // namespace impeller
32 
33 #endif // FLUTTER_IMPELLER_PLAYGROUND_IMAGE_COMPRESSED_IMAGE_H_
virtual DecompressedImage Decode() const =0
const std::shared_ptr< const fml::Mapping > source_
CompressedImage(std::shared_ptr< const fml::Mapping > allocation)