This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ RasterStatus Rasterizer::Draw(
208208
209209 RasterStatus raster_status = RasterStatus::kFailed ;
210210 LayerTreePipeline::Consumer consumer =
211- [&raster_status, weak_this = weak_factory_. GetWeakPtr () ,
211+ [&raster_status, this ,
212212 &delegate = delegate_](std::unique_ptr<LayerTreeItem> item) {
213213 // TODO(dkwingsmt): Use a proper view ID when Rasterizer supports
214214 // multi-view.
@@ -217,13 +217,11 @@ RasterStatus Rasterizer::Draw(
217217 std::unique_ptr<FrameTimingsRecorder> frame_timings_recorder =
218218 std::move (item->frame_timings_recorder );
219219 float device_pixel_ratio = item->device_pixel_ratio ;
220- if (!weak_this ||
221- delegate.ShouldDiscardLayerTree (view_id, *layer_tree.get ())) {
220+ if (delegate.ShouldDiscardLayerTree (view_id, *layer_tree.get ())) {
222221 raster_status = RasterStatus::kDiscarded ;
223222 } else {
224- raster_status =
225- weak_this->DoDraw (std::move (frame_timings_recorder),
226- std::move (layer_tree), device_pixel_ratio);
223+ raster_status = DoDraw (std::move (frame_timings_recorder),
224+ std::move (layer_tree), device_pixel_ratio);
227225 }
228226 };
229227
You can’t perform that action at this time.
0 commit comments