Skip to content

webxr: create glwindow with Rc window and without rendering context #34813

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

Merged
merged 5 commits into from
Jan 3, 2025

Conversation

wusyong
Copy link
Member

@wusyong wusyong commented Jan 2, 2025

Companion PR of servo/webxr#257
Part of #34522

This PR clarifies rendering context usage in Weber. WebXR's window creates its own Surfman context, so it doesn't really need to pass the rendering context's information. This should simplify the usage for rendering context.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes do not require tests because but servoshell should be built successfully.

@wusyong wusyong requested a review from atbrakhi as a code owner January 2, 2025 05:20
Copy link
Member

@jdm jdm left a comment

Choose a reason for hiding this comment

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

This is a nice simplification. Which platforms have you tested the glwindow backend on after these changes?

Signed-off-by: Wu Yu Wei <[email protected]>
@wusyong
Copy link
Member Author

wusyong commented Jan 2, 2025

@jdm Hmm okay I noticed I should hide the window at first. I was testing on wayland and it won't show the window if it's empty, and I thought it worked.
I tried to test some webxr demo sites from servo wiki and here, but they won't work. But in the meantime, the main branch didn't work either (I've make sure it used glwindow instead of openxr port).
Is there any instruction I could follow to test glwindow?

update: Nvm, my refactor to deprecate winit method also caused the guard fails already. Now, I can test some samples on Windows actually with these changes.

@wusyong wusyong mentioned this pull request Jan 2, 2025
22 tasks
Now glwindow will create a hidden window. It's better to not use it
unless we really want to use this port.

Signed-off-by: Wu Yu Wei <[email protected]>
@wusyong
Copy link
Member Author

wusyong commented Jan 2, 2025

Here's how it works on wayland to prove the connection is created from provided display handle (since Window's connetion is an empty type)

Screenshot from 2025-01-02 18-53-02

And Window's sample to confirm the window is hidden by default and will only be visible until the session is requested:

image

@wusyong wusyong enabled auto-merge January 3, 2025 02:25
@wusyong wusyong added this pull request to the merge queue Jan 3, 2025
Merged via the queue into servo:main with commit da2074e Jan 3, 2025
22 checks passed
@wusyong wusyong deleted the webxr-window branch January 3, 2025 04:02
delan added a commit that referenced this pull request Jan 3, 2025
…34813) (linux windows)

{"fail_fast": false, "matrix": [{"name": "Linux", "workflow": "linux", "wpt_layout": "none", "profile": "release", "unit_tests": true, "bencher": false, "wpt_args": ""}, {"name": "Windows", "workflow": "windows", "wpt_layout": "none", "profile": "release", "unit_tests": true, "bencher": false, "wpt_args": ""}]}
delan added a commit that referenced this pull request Jan 3, 2025
…34813) (linux)

{"fail_fast": false, "matrix": [{"name": "Linux", "workflow": "linux", "wpt_layout": "none", "profile": "release", "unit_tests": true, "bencher": false, "wpt_args": ""}]}
delan added a commit that referenced this pull request Jan 3, 2025
…34813) (linux windows)

{"fail_fast": false, "matrix": [{"name": "Linux", "workflow": "linux", "wpt_layout": "none", "profile": "release", "unit_tests": true, "bencher": false, "wpt_args": ""}, {"name": "Windows", "workflow": "windows", "wpt_layout": "none", "profile": "release", "unit_tests": true, "bencher": false, "wpt_args": ""}]}
@sagudev sagudev mentioned this pull request Jan 8, 2025
3 tasks
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.

2 participants