-
Notifications
You must be signed in to change notification settings - Fork 79
Replace deprecated GLKView with MTKView #282
Conversation
Thanks, @woxtu! I’m seeing a slight regression with the Metal implementation. The contents within the blurred rectangle are offset quite a bit from the area that the rectangle covers. The Before screenshot shows what’s on BeforeAfter |
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.
Requesting changes for addressing the comment above.
@mliberatore |
Hi @woxtu. I’m running Xcode 12.2 (12B45b). I just ran a few more tests on different devices, and the offset is occurring for me on 2 of the 3 test iPhones that I have handy. It occurs on:
It does not occur on:
I also tried on the iPhone 12 Mini simulator this morning, and couldn’t reproduce it there. Between the devices that you and I have tried, my hunch is that this is only happening on screens with 3x scale, and only on hardware devices, not simulators. Here’s a screenshot of it on the 6 Plus, where it appears as though the offset is even greater: Also, turning off the blur entirely just returning the image from |
I think this might be the answer to the issue, as the problem seems to be similar: https://stackoverflow.com/a/56334696 It’d warrant more testing, but for example, we could call: MTKView?.drawableSize = annotation?.image.extent.size ?? .zero from |
Hi @woxtu! I just wanted to check in on this pull request. Please let us know if you’d like to make the changes discussed above, otherwise we’d be happy to make them on our end soon. |
Hello @woxtu, could you resolve the offset or are there any updates related to this issue? Thank you! |
@woxtu would that PR add support for Mac Catalyst ? GLKit is not available but Metal Kit is. |
Closes #268
What It Does
This PR replaces GLKView with MTKView to fix warnings related to GLKView:
How to Test
Add a blur annotation to your screenshot.
Notes
I added a workaround to resolve the issue of image flipping vertically when run in the simulator. See this article for reference.