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
Loading
Please register or sign in to comment