"매 shader compilation jank 의 제거 — precompiled, predictable". Flutter 의 새 rendering engine, Skia 의 replacement. 매 first-frame shader hitch (iOS 특히) 의 근본 해결 — 매 shader 를 build-time 에 precompile 하여 runtime JIT 의 회피.
매 핵심
매 Skia 의 문제
Skia 의 SkSL shader 는 매 runtime 에 platform 별 (Metal MSL / Vulkan SPIR-V) 로 compile.
매 first encounter 시 ms-단위 stall — janky animation onset.
iOS 의 특히 심각 (Metal pipeline state object 의 cost).
매 Impeller 의 솔루션
Ahead-of-time shader compilation: build 시 모든 shader 를 platform IR 로 변환.
Predictable performance: runtime 에 매 shader compile 의 X — frame budget 안정.
Tessellation: GPU-friendly geometry pipeline (path → triangles 의 CPU offload).
// 매 build-time precompiled, 매 runtime jank 의 X
finalprogram=awaitFragmentProgram.fromAsset('shaders/wave.frag');finalshader=program.fragmentShader()..setFloat(0,size.width)..setFloat(1,size.height)..setFloat(2,time);canvas.drawRect(rect,Paint()..shader=shader);
Performance overlay
MaterialApp(showPerformanceOverlay:true,// 매 GPU/UI thread frame time 의 visual
home:MyApp(),);
Disable Impeller (debugging)
flutter run --no-enable-impeller
CustomPainter — Impeller 의 fast path
classWavePainterextendsCustomPainter{@overridevoidpaint(Canvascanvas,Sizesize){finalpath=Path();for(doublex=0;x<=size.width;x+=2){path.lineTo(x,sin(x*0.05)*20+size.height/2);}// 매 Impeller tessellator 가 GPU 친화 triangle 로 변환
canvas.drawPath(path,Paint()..style=PaintingStyle.stroke..strokeWidth=2);}@overrideboolshouldRepaint(_)=>true;}
Backdrop blur (Impeller 의 optimized)
BackdropFilter(filter:ImageFilter.blur(sigmaX:10,sigmaY:10),// 매 Impeller GPU blur
child:Container(color:Colors.black.withOpacity(0.3)),)