当前位置:网站首页>Fletter next generation graphics renderer impaller
Fletter next generation graphics renderer impaller
2022-04-23 05:35:00 【I haven't had a quiet memory for a long time】
at present Flutter The development of the community has been huge , Official statistics in the past year , Data on Flutter It has basically surpassed other cross platform frameworks , Become the most popular mobile end cross platform development tool , By 2022 year 2 month , There are almost 50 Ten thousand applications use Flutter. Abroad & Many big factories in China , Personal developers , The community is involved , But because of fullter Inherently less dynamic , Package size and some carrier class app The historical burden of , At present, the main development direction in China is To B Business or in flutter Exploration of mixed development of plug-ins .
From the recent Flutter The pace of updating can also be seen , Overall deceleration , The strategy of improving quality and improving ability in stability . such as flutter 2.0 Basically right web The complement of ability , Including some experience improvement , Support multiple engines, etc .Flutter Of 2022 The annual goal is to improve the monthly life of users , Make your community more prosperous , To cope with the impact of other cross end platforms .
2022 RoadMap brief introduction
Time has come 2022 year ,flutter The latest strategy map is around the desktop ,web, Development and interactive experience ,engine Support multiple windows and other points to polish their own ability , The author is most concerned about flutter In order to solve the problem of rendering jank New ideas for the problem of -- Refactoring shaders , That's the theme of today . About shader compilation Jank problem , After many attempts, the official still can not completely solve , So in 2022 In the middle of the year, it was clearly proposed to reconsider the way of using shaders , Plan to rewrite the image rendering backend .
In the previous article, we discussed the existing Flutter The drawing engine Skia Have carried on the analysis , Today, let's meet the new renderer in the future Impeller, At present, the renderer is still an embryonic form , Only achieved metal Back end , Support iOS and Mac System ,flutter plan 2022 In iOS Admiral Flutter Migrate to a new architecture , Then migrate the solution to other platforms based on experience . The renderer is equivalent to skia Of gpu Module has been rewritten , Whether to replace in the future flutter Under the skia, Or coexistence is unknown , The author prefers to integrate skia in , After all, cross platform compatibility costs a lot , It's very difficult .
Flutter jank
Flutter Many problems have been solved in the past year Jank problem , but compile shader As a result of Jank The problem has not been completely solved . The problem stems from Flutter The bottom layer uses skia As 2D Graphics rendering Library , and skia Internally defined a set of SkSL(Skia shading language),SkSL Belong to GLSL variant . In the rasterization phase , The first time you use a shader Skia Will be generated according to drawing commands and equipment parameters SkSL, And then SkSL Convert to a specific backend (GLSL、GLSL ES or Metal SL) Shaders , And compile it into shader program on the device . and compile shader It may take hundreds of milliseconds , Resulting in tens of frames jank.flutter After many attempts to solve , In addition slkl After preheating ,benchmark Obvious effects , But it still can't solve the problem completely .
Impeller
Impeller Is for flutter Customized renderer , at present = Only achieved metal Back end . It depends on flutter fml and display list, And implemented display list dispatcher Interface , It can be easily replaced skia.Impeller Core objectives of :
Performance improvement
Compile all shaders offline at compile time , And pre built according to the shader pipeline state objects. It also supports the distribution of single frame workload on multiple threads .
Easy to transplant
Although the underlying graphics library is widely used API( Such as Metal and Vulkan) Characteristics of , But don't rely on , Not bound
impeller Roughly divided into Compiler、Renderer,Entity、Aiks And the basic library Geomety and Base Wait for a few modules .impeller compiler Module is to solve shader compilation Jank The key , contain Compiler and Reflector. Offline compilation Start the first phase of the shader , utilize impellerc compiler hold //impeller/entity/shaders/ Source code of all shaders in the directory ( Includes vertex shaders and clip shaders ) Compiled as shader intermediate language SPIR-V. Second stage , take SPIR-V Convert to the underlying specific Shader Language ( Such as Metal SL), Then compile as shader library. Simultaneous utilization impellerc reflector Handle SPIR-V Generate C++ shader binding, Used to quickly create... At run time pipeline state objecs(PSO), This avoids the... Caused by compiling shaders jank problem , Other details and principles will be shown later . Readers can also learn from #85737 Learn about its related progress .
版权声明
本文为[I haven't had a quiet memory for a long time]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230534055708.html
边栏推荐
- Data bus realizes the communication between brother components
- Simple and basic use of switch and if
- Double click The jar package cannot run the solution
- On the use of constant pointer and pointer constant -- exercise (record)
- 五一劳动节期间什么理财产品会有收益?
- 世界与个人发展
- Some pits used by uni
- CMake基础教程(39)pkgconfig
- Knowledge of egg testing -- mock, Supertest, coffee
- Pytorch deep learning practice_ 11 convolutional neural network
猜你喜欢
Data mining -- understanding data
创建进程内存管理copy_mm - 进程与线程(九)
[the background color changes after clicking a line]
双击.jar包无法运行解决方法
如果我是pm之 演出电影vr购票展示
Excel 2016 cannot open the file for the first time. Sometimes it is blank and sometimes it is very slow. You have to open it for the second time
Interview Basics
相机成像+单应性变换+相机标定+立体校正
Establish excel bookkeeping book through setting context menu
How to set the initial value of El input number to null
随机推荐
Frequently asked interview questions - 2 (computer network)
Rog attack
(11) Vscode code formatting configuration
MySQL series - install MySQL 5.6.27 on Linux and solve common problems
Executable program execution process
双击.jar包无法运行解决方法
[the background color changes after clicking a line]
CMake基础教程(39)pkgconfig
Create process memory management copy_ Mm - processes and threads (IX)
3d slicer中拉直体的生成
Hongji micro classroom | cyclone RPA's "flexible digital employee" actuator
Camera imaging + homography transformation + camera calibration + stereo correction
es6数组的使用
Self incrementing sequence creation of MySQL
Redis in node -- ioredis
Create a tabbar component under the components folder, which is public
Create cells through JS (while loop)
Various situations of data / component binding
OSI层常用协议
Establish excel bookkeeping book through setting context menu