Flutter Engine
 
Loading...
Searching...
No Matches
image_external_texture_gl_impeller.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_SHELL_PLATFORM_ANDROID_IMAGE_EXTERNAL_TEXTURE_GL_IMPELLER_H_
6#define FLUTTER_SHELL_PLATFORM_ANDROID_IMAGE_EXTERNAL_TEXTURE_GL_IMPELLER_H_
7
8#include <memory>
9#include <optional>
10
11#include "flutter/fml/macros.h"
15
16namespace flutter {
17
19 public:
21 const std::shared_ptr<impeller::ContextGLES>& context,
22 int64_t id,
24 hardware_buffer_texture_entry,
25 const std::shared_ptr<PlatformViewAndroidJNI>& jni_facade,
27
28 private:
29 // |ImageExternalTexture|
30 void Attach(PaintContext& context) override;
31
32 // |ImageExternalTexture|
33 void Detach() override;
34
35 // |ImageExternalTextureGL|
36 sk_sp<flutter::DlImage> CreateDlImage(
37 PaintContext& context,
38 const SkRect& bounds,
39 std::optional<HardwareBufferKey> id,
40 impeller::UniqueEGLImageKHR&& egl_image) override;
41
42 const std::shared_ptr<impeller::ContextGLES> impeller_context_;
43
45};
46
47} // namespace flutter
48
49#endif // FLUTTER_SHELL_PLATFORM_ANDROID_IMAGE_EXTERNAL_TEXTURE_GL_IMPELLER_H_
ImageLifecycle
Whether the last image should be reset when the context is destroyed.
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27