Flutter 界面渲染流程

由图可见,整个 Flutter 界面渲染是从GPU开始,「垂直串行vsync」进行依次渲染,直至将「图层树Layer Tree」展示出来。

那么,途径的几个阶段到底是怎么样呢?

  • Animate:标记改变控件状态的动画(Tick animations to change widget state)
  • Build: 当组件状态发生变化时,重构控件还记得之前通过setState()改变控件状态吗(Rebuild widgets to account for state changes)
  • Layout:更新要渲染控件的尺寸和位置(Update size and position of render objects)
  • Paint:记录要展示的混合视图层(Record display lists for composited layers)

相关文章:

  • 2021-07-04
  • 2021-10-24
  • 2021-09-21
  • 2022-01-16
  • 2021-11-03
猜你喜欢
  • 2021-08-28
  • 2023-01-27
  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
  • 2021-12-12
  • 2021-12-04
相关资源
相似解决方案