Flutter Engine
 
Loading...
Searching...
No Matches
decompressed_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_DECOMPRESSED_IMAGE_H_
6#define FLUTTER_IMPELLER_PLAYGROUND_IMAGE_DECOMPRESSED_IMAGE_H_
7
8#include <memory>
9
10#include "flutter/fml/mapping.h"
12
13namespace impeller {
14
16 public:
17 enum class Format {
19 kGrey,
21 kRGB,
22 kRGBA,
23 };
24
26
28 Format format,
29 std::shared_ptr<const fml::Mapping> allocation);
30
32
33 const ISize& GetSize() const;
34
35 bool IsValid() const;
36
37 Format GetFormat() const;
38
39 const std::shared_ptr<const fml::Mapping>& GetAllocation() const;
40
42
43 private:
44 ISize size_;
45 Format format_ = Format::kInvalid;
46 std::shared_ptr<const fml::Mapping> allocation_;
47 bool is_valid_ = false;
48};
49
50} // namespace impeller
51
52#endif // FLUTTER_IMPELLER_PLAYGROUND_IMAGE_DECOMPRESSED_IMAGE_H_
DecompressedImage ConvertToRGBA() const
const std::shared_ptr< const fml::Mapping > & GetAllocation() const
const ISize & GetSize() const