Drawing on Android Surface-texture

607 views
Skip to first unread message

Pervez Alam

unread,
Feb 18, 2021, 2:52:27 PM2/18/21
to skia-discuss
Hi Skia team, I am an Adobe employee.

I am writing an Android app using Exoplayer to decode video, which provides frames on Surface/SurfaceTexture (displaying on a custom GLSurfaceView). I want to write some text/apply effects etc on these frames before displaying.

How can I access Android's SurfaceTexture/Surface/underlying hardware memory in Skia to draw/apply effects.
I want these processing done using GPU(OpenGL or Vulkan). I could find a few articles pointing to use AHardwareBuffer or ASurfaceTexture, I am not sure if it is feasible and it comes with the limitation of using Android API-28+.

Any help/pointer/sample-code is highly appreciated.


Bharat Ahuja

unread,
Feb 18, 2021, 3:04:18 PM2/18/21
to skia-d...@googlegroups.com
I think you can take a look platform_tools\android\apps\skottie\src\main\java\org\skia\skottie\SkottieRunner.java

 This class uses Android's textureview and SurfaceTexture.


Thanks
Bharat



--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/0905d971-0b41-445c-afb3-4c66c5af1a7an%40googlegroups.com.

Pervez Alam

unread,
Feb 20, 2021, 3:18:56 PM2/20/21
to skia-discuss
Thanks Bharat,

The example looks helpful, I will try and get back.
Reply all
Reply to author
Forward
0 new messages