flutter-embedded-linux icon indicating copy to clipboard operation
flutter-embedded-linux copied to clipboard

Add external texture plugin for GPU texture

Open HidenoriMatsubayashi opened this issue 3 years ago • 11 comments

The current external texture plugin which is the same with Flutter desktop for Windows supports pixel buffer only. However, its performance is not good. So we need to add a texture plugin with a GPU texture buffer.

HidenoriMatsubayashi avatar Jun 02 '21 02:06 HidenoriMatsubayashi

related issue and PR (for : https://github.com/flutter/flutter/issues/83693 https://github.com/flutter/engine/pull/26562

implementation in tizen engine:

https://github.com/flutter-tizen/engine/pull/86

charafau avatar Jun 14 '21 02:06 charafau

Thank you for sharing. I guess flutter/engine#26562 is the same implementation with flutter-tizen. I'm looking forward to it will be merged. After that, I'll copy and merge it to our repo.

HidenoriMatsubayashi avatar Jun 14 '21 03:06 HidenoriMatsubayashi

yes, I think you're right. the reason why I linked tizen one is because in discussion, dev actually shows how to use this code :)

charafau avatar Jun 14 '21 12:06 charafau

Update: https://github.com/flutter/engine/pull/26562#issuecomment-1114156009

swift-kim avatar May 12 '22 06:05 swift-kim

Hey @HidenoriMatsubayashi, isn't this thread solved by DMA buffers? Or is that different than external texture plugin.

Is using the DMA buffer that is currently implemented in video_player ensure hardware accelerated rendering? Or is it just improving the memory inefficiency problem compared to PixelBuffer?

Thank you! Been trying to figure out how to improve performance here further. I have gstreamer elements with hardware accelerated decoding, but now need to ensure that rendering is done with hardware acceleration.

talksik avatar Oct 08 '23 00:10 talksik

isn't this thread solved by DMA buffers? Or is that different than external texture plugin.

No, it's different from dmabuf in video_player. The task in this issue is that porting https://github.com/flutter/engine/pull/26840. Currently, we haven't implemented kFlutterDesktopGpuSurfaceTexture yet. See https://github.com/sony/flutter-embedded-linux/blob/master/src/flutter/shell/platform/linux_embedded/flutter_elinux_texture_registrar.cc#L51C45-L51C45

Is using the DMA buffer that is https://github.com/sony/flutter-elinux-plugins/pull/67 in video_player ensure hardware accelerated rendering? Or is it just improving the memory inefficiency problem compared to PixelBuffer?

The latter.

HidenoriMatsubayashi avatar Oct 08 '23 22:10 HidenoriMatsubayashi

Thanks @HidenoriMatsubayashi for the detailed explanation!

I will research this further to see if I can make a dent. 👍🏾

talksik avatar Oct 09 '23 03:10 talksik