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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 14092003: Add compositor support for the LatencyInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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_host.cc ('K') | « cc/trees/layer_tree_host_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_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 7b0a7e12cecbcf8304a840e1493d8237dc6c9aa7..8c8069b6ed7c5e624299988f730fe6d9da0b3aff 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1014,6 +1014,7 @@ CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const {
return metadata;
metadata.root_scroll_offset = RootScrollLayer()->TotalScrollOffset();
+ metadata.latency_info = latency_info_;
return metadata;
}
@@ -1113,7 +1114,13 @@ const RendererCapabilities& LayerTreeHostImpl::GetRendererCapabilities() const {
bool LayerTreeHostImpl::SwapBuffers(const LayerTreeHostImpl::FrameData& frame) {
if (frame.has_no_damage)
return false;
- return renderer_->SwapBuffers();
+ bool result = renderer_->SwapBuffers(latency_info_);
+ latency_info_.Clear();
+ return result;
+}
+
+void LayerTreeHostImpl::SetLatencyInfo(const LatencyInfo& latency_info) {
+ latency_info_.MergeWith(latency_info);
}
void LayerTreeHostImpl::EnableVSyncNotification(bool enable) {
« cc/trees/layer_tree_host.cc ('K') | « cc/trees/layer_tree_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698