Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
display_list_image_gpu.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_LIB_UI_PAINTING_DISPLAY_LIST_IMAGE_GPU_H_
6#define FLUTTER_LIB_UI_PAINTING_DISPLAY_LIST_IMAGE_GPU_H_
7
8#include "flutter/display_list/image/dl_image.h"
9#include "flutter/flow/skia_gpu_object.h"
10#include "flutter/fml/macros.h"
11
12namespace flutter {
13
14class DlImageGPU final : public DlImage {
15 public:
17
18 // |DlImage|
19 ~DlImageGPU() override;
20
21 // |DlImage|
22 sk_sp<SkImage> skia_image() const override;
23
24 // |DlImage|
25 std::shared_ptr<impeller::Texture> impeller_texture() const override;
26
27 // |DlImage|
28 bool isOpaque() const override;
29
30 // |DlImage|
31 bool isTextureBacked() const override;
32
33 // |DlImage|
34 bool isUIThreadSafe() const override;
35
36 // |DlImage|
37 SkISize dimensions() const override;
38
39 // |DlImage|
40 virtual size_t GetApproximateByteSize() const override;
41
42 private:
44
46
48};
49
50} // namespace flutter
51
52#endif // FLUTTER_LIB_UI_PAINTING_DISPLAY_LIST_IMAGE_GPU_H_
sk_sp< SkImage > skia_image() const override
If this display list image is meant to be used by the Skia backend, an SkImage instance....
virtual size_t GetApproximateByteSize() const override
bool isTextureBacked() const override
bool isUIThreadSafe() const override
If the underlying platform image held by this object has no threading requirements for the release of...
bool isOpaque() const override
If the pixel format of this image ignores alpha, this returns true. This method might conservatively ...
static sk_sp< DlImageGPU > Make(SkiaGPUObject< SkImage > image)
SkISize dimensions() 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< SkImage > image
Definition examples.cpp:29
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27