Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 1292773003: Queue latency info swap promises in a separate already-active queue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add missing EndArray() Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« cc/trees/layer_tree_impl.h ('K') | « cc/trees/layer_tree_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 583d94219d1d9c2a3bd6ca8a5825fc861d3a7ed9..2b8f993a8966327f83c226777cbfba1c293e3f81 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -1031,6 +1031,11 @@ void LayerTreeImpl::AsValueInto(base::trace_event::TracedValue* state) const {
for (auto* swap_promise : swap_promise_list_)
state->AppendDouble(swap_promise->TraceId());
state->EndArray();
+
+ state->BeginArray("active_tree_swap_promise_trace_ids");
+ for (auto* swap_promise : active_tree_swap_promise_list_)
+ state->AppendDouble(swap_promise->TraceId());
+ state->EndArray();
}
void LayerTreeImpl::SetRootLayerScrollOffsetDelegate(
@@ -1108,23 +1113,34 @@ void LayerTreeImpl::QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise) {
swap_promise_list_.push_back(swap_promise.Pass());
}
+void LayerTreeImpl::QueueActiveTreeSwapPromise(
+ scoped_ptr<SwapPromise> swap_promise) {
+ DCHECK(swap_promise);
+ active_tree_swap_promise_list_.push_back(swap_promise.Pass());
+}
+
void LayerTreeImpl::PassSwapPromises(
ScopedPtrVector<SwapPromise>* new_swap_promise) {
- swap_promise_list_.insert_and_take(swap_promise_list_.end(),
- new_swap_promise);
- new_swap_promise->clear();
+ BreakSwapPromises(SwapPromise::SWAP_FAILS);
danakj 2015/08/14 17:47:39 add a comment explaining what's going on? doesn't
Tobias Sargeant 2015/08/18 11:22:15 Yes, you're right. Corrected now.
+ swap_promise_list_.swap(*new_swap_promise);
}
void LayerTreeImpl::FinishSwapPromises(CompositorFrameMetadata* metadata) {
for (auto* swap_promise : swap_promise_list_)
swap_promise->DidSwap(metadata);
swap_promise_list_.clear();
+ for (auto* swap_promise : active_tree_swap_promise_list_)
+ swap_promise->DidSwap(metadata);
+ active_tree_swap_promise_list_.clear();
}
void LayerTreeImpl::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
for (auto* swap_promise : swap_promise_list_)
swap_promise->DidNotSwap(reason);
swap_promise_list_.clear();
+ for (auto* swap_promise : active_tree_swap_promise_list_)
+ swap_promise->DidNotSwap(reason);
+ active_tree_swap_promise_list_.clear();
}
void LayerTreeImpl::DidModifyTilePriorities() {
« cc/trees/layer_tree_impl.h ('K') | « cc/trees/layer_tree_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698