Using the video frames as a texture on WebGL does not work
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: sotaro, Assigned: sotaro)
References
Details
(Whiteboard: [wr-amvp][wr-q2][wr-april])
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
The following WebGL does not work on android, since GeckoSurfaceTexture could bind to only one GL context at once. With WebRender, GeckoSurfaceTexture is soon bounded to sharedGL. It prevent from usage by WebGL.
https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial/Animating_textures_in_WebGL
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
I saw the following error log.
04-16 12:19:42.819 29455 29747 E GLConsumer: [SurfaceTexture-0-29455-44] attachToContext: GLConsumer is already attached to a context
04-16 12:19:42.819 29455 29747 W System.err: java.lang.RuntimeException: Error during attachToGLContext (see logcat for details)
04-16 12:19:42.819 29455 29747 W System.err: at android.graphics.SurfaceTexture.attachToGLContext(SurfaceTexture.java:290)
04-16 12:19:42.819 29455 29747 W System.err: at org.mozilla.gecko.gfx.GeckoSurfaceTexture.attachToGLContext(GeckoSurfaceTexture.java:90)
04-16 12:19:42.819 29455 29747 W System.err: at org.mozilla.gecko.gfx.GeckoSurfaceTexture$NativeGLBlitHelper.blit(Native Method)
04-16 12:19:42.819 29455 29747 W System.err: at org.mozilla.gecko.gfx.GeckoSurfaceTexture.takeSnapshot(GeckoSurfaceTexture.java:304)
04-16 12:19:42.819 29455 29747 W System.err: at org.mozilla.gecko.gfx.SurfaceAllocatorService$1.sync(SurfaceAllocatorService.java:54)
04-16 12:19:42.819 29455 29747 W System.err: at org.mozilla.gecko.gfx.ISurfaceAllocator$Stub.onTransact(ISurfaceAllocator.java:93)
04-16 12:19:42.819 29455 29747 W System.err: at android.os.Binder.execTransact(Binder.java:565)
Assignee | ||
Comment 2•6 years ago
|
||
CompositorOGL does not cause the problem in this case, but CompositorOGL also does not handle well about contention between CompositorOGL and WebGL. For now, this bug is going to handle the problem same level as to CompositorOGL.
Updated•6 years ago
|
Assignee | ||
Comment 3•6 years ago
|
||
The contention happens when SurfaceTextureImage is blit by GLBlitHelper::BlitImageToFramebuffer(). SurfaceTextureImage is created only for SurfaceTexture of RemoteDataDecoder. Then the contention happen only for SurfaceTexture of video for now.
https://searchfox.org/mozilla-central/source/gfx/gl/GLBlitHelper.cpp#679
Assignee | ||
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
The following diagram shows how video's SurfaceTexture is consumed in content process.
https://github.com/sotaroikeda/firefox-diagrams/blob/master/mobile/mobile_SurfaceAllocatorService_68.pdf
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Pushed by sikeda@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1620e8962cab Do not bind SurfaceTexture of video to gl context if it is used by WebGL r=nical
Comment 7•5 years ago
|
||
bugherder |
Description
•