Add mIgnoreTransform handling for SurfaceTextureHost with WebRender

NEW
Assigned to

Status

()

enhancement
P3
normal
7 months ago
2 months ago

People

(Reporter: sotaro, Assigned: sotaro)

Tracking

(Blocks 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Assignee

Description

7 months ago
This bug is created by Bug 1499255 Comment 8.
Assignee

Updated

7 months ago
Priority: -- → P3
Assignee

Comment 1

2 months 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.

In 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

2 months ago

On WebRender, the getTransformMatrix() is not handled yet. Then it worked as mIgnoreTransform == true.

Assignee

Comment 3

2 months ago

On android, SurfaceTextureImage is created as gl::OriginPos::BottomLeft, though it is not handled by WebRender yet.
https://searchfox.org/mozilla-central/source/dom/media/platforms/android/RemoteDataDecoder.cpp#283

Assignee

Comment 4

2 months ago

On android, SurfaceTexture is used only for video decoding and WebGL, if android frameworks as expected, it seems not necessary to handle getTransformMatrix().

But if we use SurfaceTexture for camera frame rendering, it might cause the problem. Further, there might be a device that change rotation at ANativeWindow side.

Assignee

Updated

2 months ago
Assignee: nobody → sotaro.ikeda.g
You need to log in before you can comment on or make changes to this bug.