当前位置:网站首页>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
边栏推荐
- Frequently asked interview questions - 3 (operating system)
- ‘EddiesObservations‘ object has no attribute ‘filled‘
- Pytorch deep learning practice_ 11 convolutional neural network
- 提升独立站转化率攻略 | 挽回弃购用户
- open3d材质设置参数分析
- Phlli in a VM node
- Radar equipment (greedy)
- Jiugong magic square - the 8th Lanqiao provincial competition - group C (DFS and comparison of all magic square types)
- Click the Add button - a box appears (similar to adding learning experience - undergraduate - Graduate)
- The QT debug version runs normally and the release version runs crash
猜你喜欢
Isosceles triangle - the 9th Lanqiao provincial competition - group C
Excel sets row and column colors according to cell contents
Requirements for SQL server to retrieve SQL and user information
SQL语句简单优化
Flutter 新一代图形渲染器 Impeller
Radar equipment (greedy)
弘玑Cyclone RPA为国金证券提供技术支撑,超200个业务场景实现流程自动化
C, class library
Some pits used by uni
转置卷积(Transposed Convolution)
随机推荐
Getting started with varnish
How to set the initial value of El input number to null
数据安全入门产品——数据库审计系统详解
Processus d'exécution du programme exécutable
创建进程内存管理copy_mm - 进程与线程(九)
Understand the relationship between promise async await
Xiuxian real world and game world
50 SQL exercises, answers and detailed analysis
QSslSocket::connectToHostEncrypted: TLS initialization failed
CPT 104_ TTL 09
Output string in reverse order
Sword finger offer II 022 The entry node of the link in the linked list
Deep learning object detection
Tslint annotations ignore errors and restful understanding
acwing854. Floyd finds the shortest path
MySQL series - install MySQL 5.6.27 on Linux and solve common problems
可执行程序执行流程
The QT debug version runs normally and the release version runs crash
Basic knowledge of redis
The title bar will be pushed to coincide with the status bar