Reduce pipeline depth when GPU and Platform are same thread (flutter/engine#9132)

This commit is contained in:
Dan Field
2019-05-29 19:45:02 -07:00
committed by GitHub
parent 780b9e0918
commit 542be40698

View File

@@ -27,7 +27,14 @@ Animator::Animator(Delegate& delegate,
waiter_(std::move(waiter)),
last_begin_frame_time_(),
dart_frame_deadline_(0),
layer_tree_pipeline_(fml::MakeRefCounted<LayerTreePipeline>(2)),
// TODO(dnfield): We should remove this logic and set the pipeline depth
// back to 2 in this case. See https://github.com/flutter/engine/pull/9132
// for discussion.
layer_tree_pipeline_(fml::MakeRefCounted<LayerTreePipeline>(
task_runners.GetPlatformTaskRunner() ==
task_runners.GetGPUTaskRunner()
? 1
: 2)),
pending_frame_semaphore_(1),
frame_number_(1),
paused_(false),