Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four fixes to the WGL backend, found embedding Servo in an application that shares its own WGL context with it. Upstream CI cannot run WGL, which is likely why they went unnoticed. One commit each:
create_context_from_native_contextset no pixel format on the hidden window it renders the context on, sowglMakeCurrentfailed there and an assert fired. The only place to find anHGLRC's format is the DC it is current on, so adopting now requires the context to be current on the calling thread and returnsNoCurrentContextotherwise; a failingwglMakeCurrentreturnsMakeCurrentFailedinstead of panicking.context_descriptor_attributesnever setCOMPATIBILITY_PROFILE, so a descriptor read back from a compatibility context described a core one.create_contextrestored the previously current context, unlike EGL and CGL, so code written against those backends then issued GL calls with no context current.make_no_context_currentalso returns early when nothing is current, as releasing nothing fails on some implementations.WGL_NV_DX_interop. Without the extension, device creation failed. Generic surfaces are now plain GL textures: each connection makes a share group, rooted at the first context made or adopted on it, and contexts that share a surface's texture order their access with GL fences (left on unbind and surface texture destruction, waited on at bind and surface texture creation). With the extension nothing changes.Rebased onto main. Main removed
Device::connection(servo#401), so the device now keeps its own handle to its connection's share root rather than the connection.Tested: surfman's suite cross-compiled with cargo-xwin and run under 64-bit Wine, whose WGL has no
WGL_NV_DX_interop, so it exercises the fallback: 13 passed, 1 ignored (test_cross_device_surface_texture_blit_framebuffer, ignored on main). Not yet run on a Windows host with the extension.🤖 Generated with Claude Code