Skip to content

Commit

Permalink
Reduce layer tree pipeline depth to 2. (flutter#3909)
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmaygarde authored Jul 20, 2017
1 parent 784905e commit 5fcfb99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shell/common/animator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Animator::Animator(ftl::WeakPtr<Rasterizer> rasterizer,
: rasterizer_(rasterizer),
waiter_(waiter),
engine_(engine),
layer_tree_pipeline_(ftl::MakeRefCounted<LayerTreePipeline>(3)),
layer_tree_pipeline_(ftl::MakeRefCounted<LayerTreePipeline>(2)),
pending_frame_semaphore_(1),
frame_number_(1),
paused_(false),
Expand Down
4 changes: 3 additions & 1 deletion synchronization/pipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <memory>
#include <queue>
Expand Down Expand Up @@ -142,7 +143,8 @@ class Pipeline : public ftl::RefCountedThreadSafe<Pipeline<R>> {
Semaphore empty_;
Semaphore available_;
ftl::Mutex queue_mutex_;
std::queue<std::pair<ResourcePtr, size_t>> queue_;
std::queue<std::pair<ResourcePtr, size_t>> queue_
FTL_GUARDED_BY(queue_mutex_);
std::atomic_size_t last_trace_id_;

void ProducerCommit(ResourcePtr resource, size_t trace_id) {
Expand Down

0 comments on commit 5fcfb99

Please sign in to comment.