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

Fix incorrect Skiko render target on iOS Metal. #554

Merged
merged 3 commits into from May 9, 2023

Conversation

elijah-semyonov
Copy link

@elijah-semyonov elijah-semyonov commented May 9, 2023

Proposed Changes

Since this bug was caused by incorrect SkikoUIView size, we can just use NSLayoutConstraints instead of autoresize mask to constrain SkikoUIView size to ComposeWindow.view.

Testing

Test: launch from within Xcode. Click on M(Metal) debugger.
Screenshot 2023-05-09 at 11 45 05

Select Scope to be Metal GPU and count to 2, click capture. Scroll or trigger redraw in any other way. Investigate command buffers and check that render targets are of expected size.

Issues Fixed

Fixes: incorrect Skiko render target on iOS Metal.

Before:
image

After:
Screenshot 2023-05-09 at 11 53 14

Co-authored-by: dima.avdeev <99798741+dima-avdeev-jb@users.noreply.github.com>
@elijah-semyonov elijah-semyonov merged commit 7ac47bb into jb-main May 9, 2023
@elijah-semyonov elijah-semyonov deleted the elijah.semyonov/ios-render-target-size-fix branch May 9, 2023 10:49
@@ -0,0 +1,22 @@
# Script to regenerate xcode project
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add copyright here?

# make script folder current or exit
cd "$(dirname "$0")" || exit

if command -v xcodegen >/dev/null 2>&1; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to revert such checks to avoid extra indents of the main logic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants