Skip to content
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

macOS Ti.Blob/Image scale incorrect #12445

Closed
wants to merge 16 commits into from

Conversation

sgtcoolguy
Copy link
Contributor

@sgtcoolguy sgtcoolguy commented Feb 5, 2021

Optional Description:
This is a work in progress to try and debug why sometimes macOS image blobs report bad/unexpected width/height values for rendered View images.

I suspect this relates to the known issues around macOS Catalyst apps nativeScale being incorrect sometimes on Catalina (54009624): https://developer.apple.com/documentation/macos-release-notes/macos-catalina-10_15-release-notes

I cannot find a reliable way to detect when this occurs to hack a fix for it. The various scale values all report the correct value in the same code where the view reports a 2x density equivalent CGRect size (i.e. 5.5 for an 11px width). I also strongly suspect it may have something to do with then the OS has a modal dialog and/or notifications open. Once I close them all, the issue didn't seem to re-occur.

So, to sum up:

  • This affects macOS Catalyst apps only
  • It's "intermittent" in our testing
  • It may be due to a known issue with Catalina, and therefore may just "go away" on Big Sur

@build build added this to the 10.0.0 milestone Feb 5, 2021
@build build requested a review from a team February 5, 2021 15:35
@build
Copy link
Contributor

build commented Feb 5, 2021

Warnings
⚠️ There is no linked JIRA ticket in the PR body. Please include the URL of the relevant JIRA ticket. If you need to, you may file a ticket on JIRA
⚠️

🔍 Can't find junit reports at ./junit.*.xml, skipping generating JUnit Report.

Messages
📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.

Generated by 🚫 dangerJS against 5c7cb68

@sgtcoolguy
Copy link
Contributor Author

Didn't find any reliable way to detect and "fix" this issue. Sometimes macOS catalyst apps (maybe only on Catalina) simply return a view's bounds/size in its that assume 2x density while the screen/device itself reports a 1x density. So ultimately when we render the view to image the image is half the size it should be.

@sgtcoolguy sgtcoolguy closed this Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants