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