| 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 #pragma once
6
7 #include <memory>
8
9 #include "flutter/fml/macros.h"
10 #include "flutter/fml/mapping.h"
11 #include "impeller/geometry/size.h"
12 #include "impeller/image/decompressed_image.h"
13
14 namespace impeller {
15
16 class ImageSource;
17
18 class CompressedImage {
19 public:
20 virtual ~CompressedImage();
21
22 [[nodiscard]] virtual DecompressedImage Decode() const = 0;
23
24 bool IsValid() const;
25
26 protected:
27 const std::shared_ptr<const fml::Mapping> source_;
28
29 CompressedImage(std::shared_ptr<const fml::Mapping> allocation);
30 };
31
32 } // namespace impeller
impeller::DecompressedImage
Definition: decompressed_image.h:16
impeller::CompressedImage::source_
const std::shared_ptr< const fml::Mapping > source_
Definition: compressed_image.h:27
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:18
decompressed_image.h
impeller::CompressedImage::IsValid
bool IsValid() const
Definition: compressed_image.cc:14
impeller
Definition: aiks_context.cc:10
size.h