#include <image_external_texture_gl.h>
Classes | |
| struct | GlEntry |
Public Member Functions | |
| ImageExternalTextureGL (int64_t id, const fml::jni::ScopedJavaGlobalRef< jobject > &image_textury_entry, const std::shared_ptr< PlatformViewAndroidJNI > &jni_facade, ImageExternalTexture::ImageLifecycle lifecycle) | |
Public Member Functions inherited from flutter::ImageExternalTexture | |
| ImageExternalTexture (int64_t id, const fml::jni::ScopedJavaGlobalRef< jobject > &image_texture_entry, const std::shared_ptr< PlatformViewAndroidJNI > &jni_facade, ImageLifecycle lifecycle) | |
| virtual | ~ImageExternalTexture () |
Public Member Functions inherited from flutter::Texture | |
| Texture (int64_t id) | |
| virtual | ~Texture () |
| int64_t | Id () |
Public Member Functions inherited from flutter::ContextListener | |
| ContextListener () | |
| ~ContextListener () | |
Protected Member Functions | |
| void | Attach (PaintContext &context) override |
| void | Detach () override |
| void | ProcessFrame (PaintContext &context, const SkRect &bounds) override |
| Subclasses override this method to bind the latest representation of the hardware buffer wrapped by this texture instance to their own graphics package specific texture classes (SkImage, impeller::Texture, etc...). | |
| virtual sk_sp< flutter::DlImage > | CreateDlImage (PaintContext &context, const SkRect &bounds, std::optional< HardwareBufferKey > id, impeller::UniqueEGLImageKHR &&egl_image)=0 |
| void | UpdateImage (JavaLocalRef &hardware_buffer, const SkRect &bounds, PaintContext &context) |
| impeller::UniqueEGLImageKHR | CreateEGLImage (AHardwareBuffer *buffer) |
| FML_DISALLOW_COPY_AND_ASSIGN (ImageExternalTextureGL) | |
Protected Member Functions inherited from flutter::ImageExternalTexture | |
| JavaLocalRef | AcquireLatestImage () |
| void | CloseImage (const fml::jni::JavaRef< jobject > &image) |
| JavaLocalRef | HardwareBufferFor (const fml::jni::JavaRef< jobject > &image) |
| void | CloseHardwareBuffer (const fml::jni::JavaRef< jobject > &hardware_buffer) |
| AHardwareBuffer * | AHardwareBufferFor (const fml::jni::JavaRef< jobject > &hardware_buffer) |
Protected Attributes | |
| std::unordered_map< HardwareBufferKey, GlEntry > | gl_entries_ |
Protected Attributes inherited from flutter::ImageExternalTexture | |
| fml::jni::ScopedJavaGlobalRef< jobject > | image_texture_entry_ |
| std::shared_ptr< PlatformViewAndroidJNI > | jni_facade_ |
| AttachmentState | state_ = AttachmentState::kUninitialized |
| sk_sp< flutter::DlImage > | dl_image_ |
| ImageLRU | image_lru_ = ImageLRU() |
Additional Inherited Members | |
Public Types inherited from flutter::ImageExternalTexture | |
| enum class | ImageLifecycle { kReset , kKeepAlive } |
| Whether the last image should be reset when the context is destroyed. More... | |
Protected Types inherited from flutter::ImageExternalTexture | |
| enum class | AttachmentState { kUninitialized , kAttached , kDetached } |
Definition at line 18 of file image_external_texture_gl.h.
| flutter::ImageExternalTextureGL::ImageExternalTextureGL | ( | int64_t | id, |
| const fml::jni::ScopedJavaGlobalRef< jobject > & | image_textury_entry, | ||
| const std::shared_ptr< PlatformViewAndroidJNI > & | jni_facade, | ||
| ImageExternalTexture::ImageLifecycle | lifecycle | ||
| ) |
Definition at line 24 of file image_external_texture_gl.cc.
|
overrideprotectedvirtual |
Implements flutter::ImageExternalTexture.
Definition at line 31 of file image_external_texture_gl.cc.
References flutter::ImageExternalTexture::kAttached, flutter::ImageExternalTexture::kUninitialized, and flutter::ImageExternalTexture::state_.
|
protectedpure virtual |
Referenced by UpdateImage().
|
protected |
Definition at line 84 of file image_external_texture_gl.cc.
References FML_DCHECK, FML_LOG, and impeller::android::GetProcTable().
Referenced by UpdateImage().
|
overrideprotectedvirtual |
Implements flutter::ImageExternalTexture.
Definition at line 79 of file image_external_texture_gl.cc.
References flutter::ImageLRU::Clear(), gl_entries_, and flutter::ImageExternalTexture::image_lru_.
|
protected |
|
overrideprotectedvirtual |
Subclasses override this method to bind the latest representation of the hardware buffer wrapped by this texture instance to their own graphics package specific texture classes (SkImage, impeller::Texture, etc...).
After a call to this method, attachment state of this instance must be kAttached. That is the responsibility of the subclass.
| context | The context | |
| [in] | bounds | The bounds |
Implements flutter::ImageExternalTexture.
Definition at line 68 of file image_external_texture_gl.cc.
References flutter::ImageExternalTexture::AcquireLatestImage(), flutter::ImageExternalTexture::CloseHardwareBuffer(), flutter::ImageExternalTexture::HardwareBufferFor(), image, and UpdateImage().
|
protected |
Definition at line 44 of file image_external_texture_gl.cc.
References flutter::ImageLRU::AddImage(), flutter::ImageExternalTexture::AHardwareBufferFor(), CreateDlImage(), CreateEGLImage(), flutter::ImageExternalTexture::dl_image_, flutter::ImageLRU::FindImage(), impeller::android::HardwareBuffer::GetSystemUniqueID(), gl_entries_, flutter::ImageExternalTexture::image_lru_, and key.
Referenced by ProcessFrame().
|
protected |
Definition at line 56 of file image_external_texture_gl.h.
Referenced by Detach(), and UpdateImage().