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

This commit is contained in:
Dan Field 2019-05-29 19:45:02 -07:00 committed by GitHub
parent d4794122ab
commit fa9b5bd0e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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),