Flutter Engine
The Flutter Engine
dl_image_skia.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_DISPLAY_LIST_IMAGE_DL_IMAGE_SKIA_H_
6#define FLUTTER_DISPLAY_LIST_IMAGE_DL_IMAGE_SKIA_H_
7
8#include "flutter/display_list/image/dl_image.h"
9#include "flutter/fml/macros.h"
10
11namespace flutter {
12
13class DlImageSkia final : public DlImage {
14 public:
16
17 // |DlImage|
18 ~DlImageSkia() override;
19
20 // |DlImage|
21 sk_sp<SkImage> skia_image() const override;
22
23 // |DlImage|
24 std::shared_ptr<impeller::Texture> impeller_texture() const override;
25
26 // |DlImage|
27 bool isOpaque() const override;
28
29 // |DlImage|
30 bool isTextureBacked() const override;
31
32 // |DlImage|
33 bool isUIThreadSafe() const override;
34
35 // |DlImage|
36 SkISize dimensions() const override;
37
38 // |DlImage|
39 size_t GetApproximateByteSize() const override;
40
41 private:
42 sk_sp<SkImage> image_;
43
44 FML_DISALLOW_COPY_AND_ASSIGN(DlImageSkia);
45};
46
47} // namespace flutter
48
49#endif // FLUTTER_DISPLAY_LIST_IMAGE_DL_IMAGE_SKIA_H_
bool isOpaque() const override
If the pixel format of this image ignores alpha, this returns true. This method might conservatively ...
~DlImageSkia() override
sk_sp< SkImage > skia_image() const override
If this display list image is meant to be used by the Skia backend, an SkImage instance....
size_t GetApproximateByteSize() const override
DlImageSkia(sk_sp< SkImage > image)
Definition: dl_image_skia.cc:9
SkISize dimensions() const override
bool isUIThreadSafe() const override
If the underlying platform image held by this object has no threading requirements for the release of...
bool isTextureBacked() const override
std::shared_ptr< impeller::Texture > impeller_texture() const override
If this display list image is meant to be used by the Impeller backend, an Impeller texture instance....
Represents an image whose allocation is (usually) resident on device memory.
Definition: dl_image.h:30
sk_sp< const SkImage > image
Definition: SkRecords.h:269
Definition: SkSize.h:16