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] Disable all non-starboard backends #4828

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

TyHolc
Copy link
Contributor

@TyHolc TyHolc commented Feb 3, 2025

Cobalt will only use Starboard as an Ozone backend. Disable all non-starboard backends and avoid compiling them.

b/393422551

@TyHolc TyHolc requested a review from a team as a code owner February 3, 2025 23:57
@TyHolc
Copy link
Contributor Author

TyHolc commented Feb 3, 2025

@y4vor @madhurajayaraman When either of you have time can you confirm this works for you as well?

You may need to regenerate your args.gn using python cobalt/build/gn.py to fully confirm. Then once you compile it the binary should run with no flags or with the flag --ozone-platform=starboard but should crash for any other ozone platforms (x11, wayland, etc)

Copy link
Contributor

@y4vor y4vor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Locally for me Cobalt works.

@TyHolc TyHolc force-pushed the disable_ozone_backends branch from 29ffb5e to 42e3383 Compare February 13, 2025 19:15
@TyHolc TyHolc force-pushed the disable_ozone_backends branch from d4270da to f5e72b9 Compare February 13, 2025 22:31
@TyHolc TyHolc marked this pull request as draft February 13, 2025 22:32
@TyHolc TyHolc force-pushed the disable_ozone_backends branch 6 times, most recently from fcc1ad2 to e3ea38a Compare February 19, 2025 22:36
@y4vor y4vor requested a review from sherryzy February 19, 2025 23:34
Cobalt will only use Starboard as an Ozone backend. Disable all
non-starboard backends and avoid compiling them.

b/393422551
Change EGL call for getting a display to allow attributes to be set and
passed. Match these attributes to the ones that are set by the Cobalt
binary in ui/gl/gl_display.cc so we're sure that we're testing the
correct behavior.

b/393422551
@TyHolc TyHolc force-pushed the disable_ozone_backends branch from e3ea38a to 62d31bf Compare February 20, 2025 22:30
Copy link
Contributor

@yell0wd0g yell0wd0g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a drive by note

@@ -174,7 +185,9 @@ void FakeGraphicsContextProvider::InitializeWindow() {
}

void FakeGraphicsContextProvider::InitializeEGL() {
display_ = EGL_CALL_SIMPLE(eglGetDisplay(EGL_DEFAULT_DISPLAY));
display_ = EGL_CALL_SIMPLE(eglGetPlatformDisplay(
EGL_PLATFORM_ANGLE_ANGLE, reinterpret_cast<void*>(SB_EGL_DEFAULT_DISPLAY),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a thought that this call (eglGetPlatformDisplay() with this EGL_PLATFORM_ANGLE_ANGLE parameter) is supported as an extension (https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/extensions/EGL_ANGLE_platform_angle.txt;l=63-65 which may or may not be supported by the platform.

This code (https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/src/libANGLE/validationEGL.cpp;l=783-826;drc=883f6246c6bdd5751eb78f48b6c365158b23c3a2) might help figuring out other combinations?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants