5#ifndef FLUTTER_SHELL_PLATFORM_ANDROID_IMAGE_EXTERNAL_TEXTURE_GL_H_
6#define FLUTTER_SHELL_PLATFORM_ANDROID_IMAGE_EXTERNAL_TEXTURE_GL_H_
8#include <unordered_map>
10#include "flutter/fml/platform/android/scoped_java_ref.h"
11#include "flutter/shell/platform/android/image_external_texture.h"
13#include "flutter/impeller/renderer/backend/gles/context_gles.h"
14#include "flutter/impeller/renderer/backend/gles/gles.h"
15#include "flutter/impeller/renderer/backend/gles/texture_gles.h"
16#include "flutter/impeller/toolkit/egl/egl.h"
17#include "flutter/impeller/toolkit/egl/image.h"
18#include "flutter/impeller/toolkit/gles/texture.h"
19#include "flutter/shell/platform/android/android_context_gl_skia.h"
28 const std::shared_ptr<PlatformViewAndroidJNI>& jni_facade);
41 std::optional<HardwareBufferKey>
id,
62 const std::shared_ptr<AndroidContextGLSkia>& context,
65 const std::shared_ptr<PlatformViewAndroidJNI>& jni_facade);
69 void Detach()
override;
76 std::optional<HardwareBufferKey>
id,
85 const std::shared_ptr<impeller::ContextGLES>& context,
88 hardware_buffer_texture_entry,
89 const std::shared_ptr<PlatformViewAndroidJNI>& jni_facade);
93 void Detach()
override;
98 std::optional<HardwareBufferKey>
id,
101 const std::shared_ptr<impeller::ContextGLES> impeller_context_;
struct AHardwareBuffer AHardwareBuffer
ImageExternalTextureGLImpeller(const std::shared_ptr< impeller::ContextGLES > &context, int64_t id, const fml::jni::ScopedJavaGlobalRef< jobject > &hardware_buffer_texture_entry, const std::shared_ptr< PlatformViewAndroidJNI > &jni_facade)
ImageExternalTextureGLSkia(const std::shared_ptr< AndroidContextGLSkia > &context, int64_t id, const fml::jni::ScopedJavaGlobalRef< jobject > &image_textury_entry, const std::shared_ptr< PlatformViewAndroidJNI > &jni_facade)
void ProcessFrame(PaintContext &context, const SkRect &bounds) override
void UpdateImage(JavaLocalRef &hardware_buffer, const SkRect &bounds, PaintContext &context)
virtual sk_sp< flutter::DlImage > CreateDlImage(PaintContext &context, const SkRect &bounds, std::optional< HardwareBufferKey > id, impeller::UniqueEGLImageKHR &&egl_image)=0
impeller::UniqueEGLImageKHR CreateEGLImage(AHardwareBuffer *buffer)
FML_DISALLOW_COPY_AND_ASSIGN(ImageExternalTextureGL)
std::unordered_map< HardwareBufferKey, GlEntry > gl_entries_
ImageExternalTextureGL(int64_t id, const fml::jni::ScopedJavaGlobalRef< jobject > &image_textury_entry, const std::shared_ptr< PlatformViewAndroidJNI > &jni_facade)
void Attach(PaintContext &context) override
Optional< SkRect > bounds
sk_sp< const SkImage > image
std::nullptr_t JavaLocalRef
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
impeller::UniqueGLTexture texture
impeller::UniqueEGLImageKHR egl_image