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

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: Use different return value for failed draw in test, to avoid NOTREACHED() 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
« no previous file with comments | « 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 ff048674af2bae33feb2d5987282c434be177d98..506a3f0a7d8f32def2c40f6b5f3d431fd1b89f5f 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("pinned_swap_promise_trace_ids");
+ for (auto* swap_promise : pinned_swap_promise_list_)
+ state->AppendDouble(swap_promise->TraceId());
+ state->EndArray();
}
void LayerTreeImpl::SetRootLayerScrollOffsetDelegate(
@@ -1108,23 +1113,37 @@ void LayerTreeImpl::QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise) {
swap_promise_list_.push_back(swap_promise.Pass());
}
+void LayerTreeImpl::QueuePinnedSwapPromise(
+ scoped_ptr<SwapPromise> swap_promise) {
+ DCHECK(IsActiveTree());
+ DCHECK(swap_promise);
+ pinned_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();
+ for (auto* swap_promise : swap_promise_list_)
+ swap_promise->DidNotSwap(SwapPromise::SWAP_FAILS);
+ swap_promise_list_.clear();
+ 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 : pinned_swap_promise_list_)
+ swap_promise->DidSwap(metadata);
+ pinned_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 : pinned_swap_promise_list_)
+ swap_promise->DidNotSwap(reason);
+ pinned_swap_promise_list_.clear();
}
void LayerTreeImpl::DidModifyTilePriorities() {
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698