修复iOS多引擎支持 - #55
Open
yangha886 wants to merge 1 commit into
Open
修复iOS多引擎支持#55yangha886 wants to merge 1 commit into
yangha886 wants to merge 1 commit into
Conversation
Collaborator
|
@yangha886 感谢你的 PR,我们会找时间仔细阅读。同时,我们也希望社区的朋友们一起参与进来。 |
Author
|
@wongkoo 我发现,当使用texture渲染,在加载大量图片的页面滑动过程中通过屏幕边界右滑返回很容易出现崩溃, 在查看原因的过程中发现是子线程中使用已被标记为deactive的纹理导致的(此时主线程已调用stopTask), 我的解决办法是生成bufferRef放在子线程,然后回调给主线程绑定纹理id,如有需要,后续有时间我会再提一次PR。 |
能看看怎么改的吗 |
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.
根据 大佬@MeandNi 在#38 中修复Android侧多引擎的思路,仿写的iOS支持多引擎。
差别在于,在iOS中
(FlutterError* _Nullable)onListenWithArguments:(id _Nullable)arguments
eventSink:(FlutterEventSink)eventSink {}
回调时机有可能会在图片数据回调之后, 导致Flutter侧无法接受到图片信息。
所以这边新增了个NSMutableArray<NSMutableDictionary *> *sendQueue;
用于保存在eventSkin生成前收到的所有图片信息,生成后重新发送并清空。