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

⚡ performance: improve canvas drawing performance #679

Merged
merged 2 commits into from
Sep 13, 2021

Conversation

wssgcg1213
Copy link
Member

@wssgcg1213 wssgcg1213 commented Sep 13, 2021

  • Picture 是个指令收集器, 使用 picture 作为 snapshot 实质上只是让 UI 线程(dart vm)的指令扁平化了, 但是 c++ engine 侧的指令还在累计, 通过 picture.approximateBytesUsed 可以看到数字在不断增长; 把 Picture 转换为 Image 作为 snapshot 可以解决这个问题
    fix JS循环使用Canvas绘制导致性能下降。 #676

@wssgcg1213 wssgcg1213 merged commit c251c85 into main Sep 13, 2021
@wssgcg1213 wssgcg1213 deleted the performance/canvas-drawing-performance branch September 13, 2021 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JS循环使用Canvas绘制导致性能下降。
3 participants