Skip to content
Commit a041114b authored by Emilian Peev's avatar Emilian Peev
Browse files

Check and configure pixel format when locking canvas

When locking the canvas we assume that the surface
always uses the default RGB pixel format.  In some
cases like the MediaRecorder input surface, the
format could be entirely different which can
cause issues when trying to generate SKIA content.
To avoid this, check the surface format first and
configure the default RGB in case the value is
unexpected.

Bug: 130385299
Test: Verified the output of:
atest
cts/tests/tests/media/src/android/media/cts/MediaRecorderTest.java#testSurfaceRecording
test
cts/tests/tests/media/src/android/media/cts/MediaRecorderTest.java#testPersistentSurfaceRecording
atest
cts/tests/tests/media/src/android/media/cts/MediaRecorderTest.java#testSurfaceRecordingTimeLapse
atest
cts/tests/tests/media/src/android/media/cts/MediaRecorderTest.java#testPersistentSurfaceRecordingTimeLapse
atest cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/SurfaceViewTests.java
atest cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/TextureViewTests.java
atest cts/tests/tests/view/src/android/view/cts/SurfaceViewSyncTest.java
atest cts/tests/tests/view/src/android/view/cts/ASurfaceControlTest.java

Change-Id: I5459c52067725b0131010f362de5eb268fe7f9d9
parent d8913d7e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment