160 {
162
164
165 const FixedRefreshRateStopwatch unused_stopwatch;
166
167 LayerStateStack preroll_state_stack;
168
169 preroll_state_stack.set_preroll_delegate(
bounds);
170 PrerollContext preroll_context{
171
172#if !SLIMPELLER
173 .raster_cache = nullptr,
174#endif
175 .gr_context = gr_context,
176 .view_embedder = nullptr,
177 .state_stack = preroll_state_stack,
178 .dst_color_space = nullptr,
179 .surface_needs_readback = false,
180 .raster_time = unused_stopwatch,
181 .ui_time = unused_stopwatch,
182 .texture_registry = texture_registry,
183
184 };
185
186 LayerStateStack paint_state_stack;
187 paint_state_stack.set_delegate(&
builder);
188 PaintContext paint_context = {
189
190 .state_stack = paint_state_stack,
192 .gr_context = gr_context,
193 .dst_color_space = nullptr,
194 .view_embedder = nullptr,
195 .raster_time = unused_stopwatch,
196 .ui_time = unused_stopwatch,
197 .texture_registry = texture_registry,
198#if !SLIMPELLER
199 .raster_cache = nullptr,
200#endif
201 .layer_snapshot_store = nullptr,
202 .enable_leaf_layer_tracing = false,
203
204 };
205
206
207
208 if (root_layer_) {
209 root_layer_->Preroll(&preroll_context);
210
211
212 if (root_layer_->needs_painting(paint_context)) {
213 root_layer_->Paint(paint_context);
214 }
215 }
216
218}
Optional< SkRect > bounds
#define TRACE_EVENT0(category_group, name)