优化FSMetalView 横竖屏旋转或者做size动画时,画面会被拉伸的问题#66
Merged
debugly merged 8 commits intodebugly:mainfrom Dec 26, 2025
Merged
Conversation
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.
FSMetalView里新增一个FSMetalRenderedView作为subview,FSMetalRenderedView里处理之前FSMetalView的渲染逻辑,FSMetalView根据scalingMode等属性去布局FSMetalRenderedView,这样做动画就比较丝滑且没有拉伸问题了,如下面视频所示:
① 优化前:
https://github.com/user-attachments/assets/ecab7a1f-c9bb-473b-bc89-42b35f08a0a6
② 优化后:
https://github.com/user-attachments/assets/555867ba-5770-44f8-8e6c-096f831c37eb