-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Support wp color management proto #9444
base: main
Are you sure you want to change the base?
Conversation
thanks as always! tag me for review when this is ready. |
@vaxerski ready for review |
} | ||
|
||
SP<CWLSurfaceResource> CWLSurfaceResource::findFirst(std::function<bool(SP<CWLSurfaceResource>)> fn) { | ||
return findFirstHelper(self.lock(), fn); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this preorder and not bf? If it's supposed to be preorder, the fn should mention this (e.g. findFirstPreorder)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no reason, can be any order. just an easy solution which assumes that there are few total subsurfaces and only one of them has CM attached. it's probably a wine-wayland quirk and most clients will have cm on the main surface. if it's not the case then we can't just passthrough cm properties to hdr metadata.
leave it as is, findAny
, findFirstPreorder
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
findFirstPreorder
CM_TRANSFER_FUNCTION_HLG = 13, | ||
}; | ||
|
||
// FIXME should be ok this way. unsupported primaries/tfs must be rejected earlier. might need a proper switch-case with exception as default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
each enum should have a 0
for INVALID and return invalid if needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for INVALID. proto spec has 2 requirements: clients must send only supported values and compositors must respond with INVALID_PRIMARIES_NAMED error if the value isn't supported. this ensures that only supported values are passed to this function. internal enum values should be kept in sync with supported proto values. will need a fix if for some reason this enums will diverge in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then it shouldn't be a FIXME but a warning at best
Describe your PR, what does it fix/add?
Support wp color-management. #9443
Added
debug:full_cm_proto
to switch proto into debug mode (requires restart).In regular mode this implementation does almost nothing. It handles the minimum required subset of features.
In debug mode all features and values are marked as supported. Features related to fullscreen HDR will work the same as with xx-cm and frog-cm. Other features will only store and pass values and output some log messages.
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
Needs #9064 to be useful. Without it xx-cm and frog-cm should be used instead because those protos are less likely to break things for newer clients with correct wp-cm support.
Needs nix wp version bump.
Needs a proper way of handling images description ids to avoid duplication (not a priority, very unlikely conditions to be useful)
Is it ready for merging, or does it need work?
Ready.