@@ -161,6 +161,7 @@ pub struct SkiaRenderer {
161161 maybe_window_adapter : RefCell < Option < Weak < dyn WindowAdapter > > > ,
162162 rendering_notifier : RefCell < Option < Box < dyn RenderingNotifier > > > ,
163163 image_cache : ItemCache < Option < skia_safe:: Image > > ,
164+ layer_cache : ItemCache < Option < ( Vector2D < f32 , PhysicalPx > , skia_safe:: Image ) > > ,
164165 path_cache : ItemCache < Option < ( Vector2D < f32 , PhysicalPx > , skia_safe:: Path ) > > ,
165166 rendering_metrics_collector : RefCell < Option < Rc < RenderingMetricsCollector > > > ,
166167 rendering_first_time : Cell < bool > ,
@@ -186,6 +187,7 @@ impl SkiaRenderer {
186187 maybe_window_adapter : Default :: default ( ) ,
187188 rendering_notifier : Default :: default ( ) ,
188189 image_cache : Default :: default ( ) ,
190+ layer_cache : Default :: default ( ) ,
189191 path_cache : Default :: default ( ) ,
190192 rendering_metrics_collector : Default :: default ( ) ,
191193 rendering_first_time : Default :: default ( ) ,
@@ -206,6 +208,7 @@ impl SkiaRenderer {
206208 maybe_window_adapter : Default :: default ( ) ,
207209 rendering_notifier : Default :: default ( ) ,
208210 image_cache : Default :: default ( ) ,
211+ layer_cache : Default :: default ( ) ,
209212 path_cache : Default :: default ( ) ,
210213 rendering_metrics_collector : Default :: default ( ) ,
211214 rendering_first_time : Default :: default ( ) ,
@@ -239,6 +242,7 @@ impl SkiaRenderer {
239242 maybe_window_adapter : Default :: default ( ) ,
240243 rendering_notifier : Default :: default ( ) ,
241244 image_cache : Default :: default ( ) ,
245+ layer_cache : Default :: default ( ) ,
242246 path_cache : Default :: default ( ) ,
243247 rendering_metrics_collector : Default :: default ( ) ,
244248 rendering_first_time : Default :: default ( ) ,
@@ -272,6 +276,7 @@ impl SkiaRenderer {
272276 maybe_window_adapter : Default :: default ( ) ,
273277 rendering_notifier : Default :: default ( ) ,
274278 image_cache : Default :: default ( ) ,
279+ layer_cache : Default :: default ( ) ,
275280 path_cache : Default :: default ( ) ,
276281 rendering_metrics_collector : Default :: default ( ) ,
277282 rendering_first_time : Default :: default ( ) ,
@@ -404,6 +409,7 @@ impl SkiaRenderer {
404409 maybe_window_adapter : Default :: default ( ) ,
405410 rendering_notifier : Default :: default ( ) ,
406411 image_cache : Default :: default ( ) ,
412+ layer_cache : Default :: default ( ) ,
407413 path_cache : Default :: default ( ) ,
408414 rendering_metrics_collector : Default :: default ( ) ,
409415 rendering_first_time : Default :: default ( ) ,
@@ -453,6 +459,7 @@ impl SkiaRenderer {
453459 maybe_window_adapter : Default :: default ( ) ,
454460 rendering_notifier : Default :: default ( ) ,
455461 image_cache : Default :: default ( ) ,
462+ layer_cache : Default :: default ( ) ,
456463 path_cache : Default :: default ( ) ,
457464 rendering_metrics_collector : Default :: default ( ) ,
458465 rendering_first_time : Cell :: new ( true ) ,
@@ -648,6 +655,7 @@ impl SkiaRenderer {
648655 window,
649656 surface,
650657 & self . image_cache ,
658+ & self . layer_cache ,
651659 & self . path_cache ,
652660 & mut box_shadow_cache,
653661 ) ;
0 commit comments