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/macros.h"
11 #include "flutter/fml/mapping.h"
12 #include "impeller/geometry/size.h"
14 
15 namespace impeller {
16 
17 class ImageSource;
18 
20  public:
21  virtual ~CompressedImage();
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_
impeller::DecompressedImage
Definition: decompressed_image.h:17
impeller::CompressedImage::source_
const std::shared_ptr< const fml::Mapping > source_
Definition: compressed_image.h:28
impeller::CompressedImage::Decode
virtual DecompressedImage Decode() const =0
impeller::CompressedImage::CompressedImage
CompressedImage(std::shared_ptr< const fml::Mapping > allocation)
Definition: compressed_image.cc:9
impeller::CompressedImage::~CompressedImage
virtual ~CompressedImage()
impeller::CompressedImage
Definition: compressed_image.h:19
decompressed_image.h
impeller::CompressedImage::IsValid
bool IsValid() const
Definition: compressed_image.cc:14
impeller
Definition: aiks_blur_unittests.cc:20
size.h