@@ -25,15 +25,12 @@ void LayerTree::Preroll(CompositorContext::ScopedFrame& frame,
2525 frame.canvas () ? frame.canvas ()->imageInfo ().colorSpace () : nullptr ;
2626 frame.context ().raster_cache ().SetCheckboardCacheImages (
2727 checkerboard_raster_cache_images_);
28- PrerollContext context = {
28+ Layer:: PrerollContext context = {
2929 ignore_raster_cache ? nullptr : &frame.context ().raster_cache (),
3030 frame.gr_context (),
3131 color_space,
3232 SkRect::MakeEmpty (),
33- frame.context ().frame_time (),
34- frame.context ().engine_time (),
35- frame.context ().texture_registry (),
36- checkerboard_offscreen_layers_};
33+ };
3734
3835 root_layer_->Preroll (&context, frame.root_surface_transformation ());
3936}
@@ -63,16 +60,15 @@ void LayerTree::UpdateScene(SceneUpdateContext& context,
6360}
6461#endif
6562
66- void LayerTree::Paint (CompositorContext::ScopedFrame& frame,
67- bool ignore_raster_cache) const {
63+ void LayerTree::Paint (CompositorContext::ScopedFrame& frame) const {
6864 TRACE_EVENT0 (" flutter" , " LayerTree::Paint" );
6965 Layer::PaintContext context = {
70- *frame.canvas (),
71- frame.context ().frame_time (),
72- frame.context ().engine_time (),
73- frame.context ().texture_registry (),
74- ignore_raster_cache ? nullptr : &frame. context (). raster_cache (),
75- checkerboard_offscreen_layers_ };
66+ *frame.canvas (), //
67+ frame.context ().frame_time (), //
68+ frame.context ().engine_time (), //
69+ frame.context ().texture_registry (), //
70+ checkerboard_offscreen_layers_ //
71+ };
7672
7773 if (root_layer_->needs_painting ())
7874 root_layer_->Paint (context);
@@ -88,29 +84,24 @@ sk_sp<SkPicture> LayerTree::Flatten(const SkRect& bounds) {
8884 return nullptr ;
8985 }
9086
87+ Layer::PrerollContext preroll_context{
88+ nullptr , // raster_cache (don't consult the cache)
89+ nullptr , // gr_context (used for the raster cache)
90+ nullptr , // SkColorSpace* dst_color_space
91+ SkRect::MakeEmpty (), // SkRect child_paint_bounds
92+ };
93+
9194 const Stopwatch unused_stopwatch;
9295 TextureRegistry unused_texture_registry;
9396 SkMatrix root_surface_transformation;
9497 // No root surface transformation. So assume identity.
9598 root_surface_transformation.reset ();
9699
97- PrerollContext preroll_context{
98- nullptr , // raster_cache (don't consult the cache)
99- nullptr , // gr_context (used for the raster cache)
100- nullptr , // SkColorSpace* dst_color_space
101- SkRect::MakeEmpty (), // SkRect child_paint_bounds
102- unused_stopwatch, // frame time (dont care)
103- unused_stopwatch, // engine time (dont care)
104- unused_texture_registry, // texture registry (not supported)
105- false , // checkerboard_offscreen_layers
106- };
107-
108100 Layer::PaintContext paint_context = {
109101 *canvas, // canvas
110102 unused_stopwatch, // frame time (dont care)
111103 unused_stopwatch, // engine time (dont care)
112104 unused_texture_registry, // texture registry (not supported)
113- nullptr , // raster cache
114105 false // checkerboard offscreen layers
115106 };
116107
0 commit comments