From 5fcfb995bbce72b5f1ee807121f51a3c0280c8b4 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Wed, 19 Jul 2017 17:47:44 -0700 Subject: [PATCH] Reduce layer tree pipeline depth to 2. (#3909) --- shell/common/animator.cc | 2 +- synchronization/pipeline.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/shell/common/animator.cc b/shell/common/animator.cc index acf28add8..f4b1846d4 100644 --- a/shell/common/animator.cc +++ b/shell/common/animator.cc @@ -16,7 +16,7 @@ Animator::Animator(ftl::WeakPtr rasterizer, : rasterizer_(rasterizer), waiter_(waiter), engine_(engine), - layer_tree_pipeline_(ftl::MakeRefCounted(3)), + layer_tree_pipeline_(ftl::MakeRefCounted(2)), pending_frame_semaphore_(1), frame_number_(1), paused_(false), diff --git a/synchronization/pipeline.h b/synchronization/pipeline.h index 784b71ed9..961a0df96 100644 --- a/synchronization/pipeline.h +++ b/synchronization/pipeline.h @@ -12,6 +12,7 @@ #include "lib/ftl/macros.h" #include "lib/ftl/memory/ref_counted.h" #include "lib/ftl/synchronization/mutex.h" +#include "lib/ftl/synchronization/thread_annotations.h" #include #include @@ -142,7 +143,8 @@ class Pipeline : public ftl::RefCountedThreadSafe> { Semaphore empty_; Semaphore available_; ftl::Mutex queue_mutex_; - std::queue> queue_; + std::queue> queue_ + FTL_GUARDED_BY(queue_mutex_); std::atomic_size_t last_trace_id_; void ProducerCommit(ResourcePtr resource, size_t trace_id) { -- GitLab