Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ozone: Only use Starboard platform #5038

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yell0wd0g
Copy link
Contributor

This CL removes Ozone auto platforms and leaves only Starboard.

This in turn removes Angle X11 support (see GN logic here). Many unittests that are passing on ToT start failing as consequence, concretely I tried cc_unittests, viz_unittests, gpu_unittests, gl_unittests and ozone_unittests.

The first reason for failing is that ozone_platform_starboard.cc starts failing due to injecting the flag which hits this DCHECK. Once that injection is removed, then the InitializeOneOffHelper() logic (which is only used for tests) tries to initialize Angle Sw backend, SwANGLE, which is what we want for unit tests (of course not for integration tests).

This SwANGLE in turn fails due to trying to initialize the actual machine Display. We don't want that for unit tests, so a new GN flag needs to be added to tell Angle to not draw on the screen when using SwANGLE: angle_use_vulkan_null_display is also set in this CL (SwANGLE uses vulkan behind the scenes).

With this CL cc_unittests, viz_unittests, gpu_unittests, gl_unittests and ozone_unittests are passing on my gLinux (amd, mesa radeon etc).

yell0wd0g added a commit that referenced this pull request Mar 11, 2025
#5042)

FakeGraphicsContextProvider is used by NPLB tests to create a, well,
Fake graphics scaffolding. However, in `InitializeEGL()`, it creates a
real EGLSurface (i.e. connected to the actual screen), which of course
is unnecessary (because we want a Fake). This CL changes the code to
create an off-screen pixel buffer surface (PBufferSurface).

It also takes the chance to modernize the code: introduces constexpr,
for-range loop, and std::vector (to avoid malloc-free).

I wanted to do this a while back to address nplb flakes: locally I saw
`eglCreateWindowSurface()` failing to allocate the needed EGLSurface,
and I thought it could be due to too many back-to-back EGL
construct-initialize-destruct cycles. However, the flake was still there
so I decided to not touch the code. But #4987, #5038 have made this
change necessary.

This was tested locally on my gLinux box running:
`xvfb-run ./out/linux-x64x11_devel/nplb --v=3 --gtest_filter=*SbPlayer*`
- 567 seconds, 2920 tests, 8 passed, 2192 skipped.

Then I run all the tests, just to be sure: `xvfb-run
./out/linux-x64x11_devel/nplb --v=3`

```
[==========] 3522 tests from 178 test suites ran. (640050 ms total)
[  PASSED  ] 591 tests.
[  SKIPPED ] 2925 tests, listed below:
.....
[  FAILED  ] 6 tests, listed below:
[  FAILED  ] SbAudioSinkTest.UpdateStatusCalled
[  FAILED  ] MultiplePlayerTest.SunnyDay
[  FAILED  ] SbMediaSetAudioWriteDurationTests/SbMediaSetAudioWriteDurationTest.WriteLimitedInput/0, where GetParam() = "beneath_the_canopy_aac_stereo.dmp"
[  FAILED  ] SbMediaSetAudioWriteDurationTests/SbMediaSetAudioWriteDurationTest.WriteContinuedLimitedInput/0, where GetParam() = "beneath_the_canopy_aac_stereo.dmp"
[  FAILED  ] VerticalVideoTests/VerticalVideoTest.WriteSamples/audio_silence_aac_stereo_dmp_video_vertical_1080p_30_fps_137_avc_dmp_output_decode_to_texture_key_system_null, where GetParam() = 40-byte object <B4-D3 4E-E3 F0-55 00-00 02-D4 4E-E3 F0-55 00-00 00-00 00-00 AB-AB AB-AB 57-16 51-E3 F0-55 00-00 57-16 51-E3 F0-55 00-00>
[  FAILED  ] VerticalVideoTests/VerticalVideoTest.WriteSamples/audio_silence_aac_stereo_dmp_video_vertical_1080p_30_fps_137_avc_dmp_output_punch_out_key_system_null, where GetParam() = 40-byte object <B4-D3 4E-E3 F0-55 00-00 02-D4 4E-E3 F0-55 00-00 01-00 00-00 AB-AB AB-AB 57-16 51-E3 F0-55 00-00 57-16 51-E3 F0-55 00-00>
```

Bug: b/384819454
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant