| 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"
11 #include "impeller/playground/image/decompressed_image.h"
12
13 namespace impeller {
14
15 class ImageSource;
16
17 class CompressedImage {
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_
impeller::CompressedImage
Definition: compressed_image.h:17
impeller::CompressedImage::~CompressedImage
virtual ~CompressedImage()
impeller::CompressedImage::Decode
virtual DecompressedImage Decode() const =0
impeller::CompressedImage::source_
const std::shared_ptr< const fml::Mapping > source_
Definition: compressed_image.h:26
impeller::CompressedImage::CompressedImage
CompressedImage(std::shared_ptr< const fml::Mapping > allocation)
Definition: compressed_image.cc:9
impeller::CompressedImage::IsValid
bool IsValid() const
Definition: compressed_image.cc:14
impeller::DecompressedImage
Definition: decompressed_image.h:15
decompressed_image.h
impeller
Definition: allocation.cc:12