fix: Add DesktopVideoDevice::colorProfile() on macOS#1239
Open
bernie-laberge wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
Open
fix: Add DesktopVideoDevice::colorProfile() on macOS#1239bernie-laberge wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
bernie-laberge wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
Conversation
Signed-off-by: Bernard Laberge <bernard.laberge@autodesk.com>
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.
Add DesktopVideoDevice::colorProfile() on macOS
Linked issues
Fixes #1034
Describe the reason for the change.
Note that this PR is adding the following to @williamwira 's PR: #1080
Prior to Open RV 3.1.0 (aka 2025.1.0), the macOS supported automatic color profile detection because it was implemented in CGDesktopVideoDevice.
Now CGDesktopVideoDevice is no longer used and DesktopVideoDevice is used instead which does not contain automatic color profile detection on macOS.
This PR solves this regression by adding the code that used to be in CGDesktopVideoDevice to DesktopVideoDevice::colorProfile() on macOS.
Summarize your change.
macOS color profile support: Implements DesktopVideoDevice::colorProfile() for macOS using the ColorSync framework. The method enumerates online displays, finds the correct screen by index, and reads the ICC profile description and file URL from the display's ColorSyncProfileRef. Previously this virtual method was only implemented on Windows.
OCIO synlinearize/syndisplay initialization fix: Adds an m_initialized flag to OCIOIPNode to prevent spurious exceptions being thrown during node construction. The updateFunction() call in the constructor can fire before transform URL/data properties are set; the guard lets those early calls return cleanly instead of throwing.
OCIO empty input color space fix: synlinearize and syndisplay build their pipelines from file/URL transforms rather than named OCIO color spaces, so an empty ocio.inColorSpace is valid for those modes. The early return in updateFunction() is now skipped for those two function types.
Describe what you have tested and on which operating system.
Successfully tested on macOS
Add a list of changes, and note any that might need special attention during the review.
If possible, provide screenshots.