Closed Bug 1507076 Opened 3 years ago Closed 1 year ago

Add mIgnoreTransform handling for SurfaceTextureHost with WebRender


(Core :: Graphics: WebRender, enhancement, P3)






(Reporter: sotaro, Assigned: sotaro)


(Blocks 1 open bug)


This bug is created by Bug 1499255 Comment 8.
Priority: -- → P3

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.

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

On android, SurfaceTextureImage is created as gl::OriginPos::BottomLeft, though it is not handled by WebRender yet.

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: nobody → sotaro.ikeda.g

@sotaro: What issues is this currently causing? Or is this a performance issue?

Flags: needinfo?(sotaro.ikeda.g)

For now, we do not have a issue by it. Then we could close this bug for now. When the problem happens, this bug could be re-opened.

This is not a performance issue. When transform is set by android platform, image is just rendered as rotated.

Closed: 1 year ago
Flags: needinfo?(sotaro.ikeda.g)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.