Use one surface frame metadata contract - #113
Merged
Merged
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.
Summary
WaylandClientandWaylandGraphicsPreviewhad separate public types for the same compositor metadata. This PR replaces those parallel models withSurfaceFrameMetadatainWaylandClient. Content type, presentation hint, alpha, color representation, and damage now travel through the same internalSurfaceCommitMetadatapath for direct software drawing, software fallback, managed GPU submissions, and external buffers.Window.showandWindow.redrawnow each have two public forms: one direct draw and one prepared draw. Every form accepts metadata and optional presentation feedback, then returnsSoftwarePresentationOutcome.The PR also fixes the EventBroker Thread Sanitizer race. Broker state is protected by an
NSLockacquired before Swift starts the guardedinoutaccess.EventWaiterstays onSynchronization.Mutex.Behavior
SurfaceFrameMetadataErrorbefore drawing, acquiring a software pool or buffer, or sending a presentation-side Wayland request..superseded; only current work gets final metadata capability revalidation..nonepolicy rejects nonempty metadata before submission-side window or configure work in both normal and software paths..preferAvailablefallback behavior is unchanged.nilis the only full-frame damage representation. A non-nilSurfaceDamageRegioncontains finite, nonempty damage.Migration
This removes the graphics-prefixed metadata types:
WaylandGraphicsDamageRegionWaylandGraphicsFrameMetadataWaylandGraphicsContentTypeWaylandGraphicsPresentationHintWaylandGraphicsAlphaModifierWaylandGraphicsColorAlphaModeWaylandGraphicsColorRepresentationCallers now put damage in
SurfaceFrameMetadata.damage. Color-description ownership remains package-only until the library has a managed image-description producer.Public timeout parameters remain
Int32in this PR. Moving them toMillisecondsis a separate change.Validation
cheap,required-product,headless-request-path, and aggregaterequiredchecks passed.EventBrokerCancellationTestspassed under Thread Sanitizer.wck api verify,wck docs verify,wck docc verify, andwck examples buildpassed.wck ci required./tmpscratch directories passed the selected metadata, presenter, graphics, and EventBroker TSan checks.