WebGL is rendered as upside down on android
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox68 | --- | fixed |
People
(Reporter: sotaro, Assigned: sotaro)
References
Details
(Whiteboard: [wr-amvp][wr-q2])
Attachments
(1 file)
On WebGL, a rotation info is delivered by GeckoSurfaceTexture. It is not handled yet with WebRender.
Bug 1507076 is related.
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Updated•7 years ago
|
Updated•7 years ago
|
| Assignee | ||
Comment 1•7 years ago
•
|
||
SurfaceTexture is expected to be used with SurfaceTexture.getTransformMatrix(). With the matrix, SurfaceTexture's gl texture worked as bottom left origin. But current WebRender does not use the getTransformMatrix(). Then the gl texture worked as top left origin. Then WebGL rendering was flipped. Then Bug 1507076 is related.
On android, GLConsumer::computeTransformMatrix() calculate a matrix for the getTransformMatrix(). If there is no transform, it jut multiply y-flip.
http://androidxref.com/9.0.0_r3/xref/frameworks/native/libs/gui/GLConsumer.cpp#866
https://developer.android.com/reference/android/graphics/SurfaceTexture
| Assignee | ||
Comment 2•7 years ago
|
||
On android, SurfaceTextureImage is created as gl::OriginPos::BottomLeft. The origin is not handled by WebRender. But it does not cause rendering problem, since getTransformMatrix() is also not handled and texture origin effectively worked as gl::OriginPos::TopLeft.
https://searchfox.org/mozilla-central/source/dom/media/platforms/android/RemoteDataDecoder.cpp#283
| Assignee | ||
Comment 3•7 years ago
|
||
On android WebGL, y-flip is handled by nsDisplayCanvas::CreateWebRenderCommands(). But with WebRender, the getTransformMatrix() is not handled yet. Gl texture of SurfaceTexture is rendered as top left origin, then texture rendering result became y-flipped.
https://searchfox.org/mozilla-central/source/layout/generic/nsHTMLCanvasFrame.cpp#178
| Assignee | ||
Comment 4•7 years ago
|
||
If SurfaceTexture usage is only Video decoding and WebGL, it is not necessary to handle getTransformMatrix() for now.
Long term solution is going to be handled by Bug 1507076.
| Assignee | ||
Comment 5•7 years ago
|
||
| Assignee | ||
Comment 6•7 years ago
|
||
Comment 8•7 years ago
|
||
| bugherder | ||
Description
•