Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd69e2a2 authored by Naveen Kalla's avatar Naveen Kalla
Browse files

Fix setSurfaceTexture to handle surface caching

TextureView contains its surfaceTexture (i.e. mSurface)
and its OnFrameAvailableListener(i.e. mUpdateListener).
In order to apply a cached/pre-existing SurfaceTexture s1 to a
TextureView, if we call TextureView.setSurfaceTexture(s1),
the OnFrameAvailableListener of s1 should get set to mUpdateListener
of TextureView since the mSurface has been updated.
The existing code doesn't apply this and causes the frames to not be
updated on a TextureView that uses setSurfaceTexture.
This change fixes setSurfaceTexture method by setting s1's
OnFrameAvailableListener to mUpdateListener.

Change-Id: I4c1a704c587e977ab7a6b1fe3a7d3e0d20d00218
parent 969b0278
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment