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

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: fix impl-side painting 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
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 bfa05e39fa1d0f480db280aa7fe9a21f413508bc..0adf8e45fa20901e51f497b04d811487094bbab8 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -875,6 +875,8 @@ bool LayerTreeHostImpl::PrepareToDraw(FrameData* frame,
if (!CalculateRenderPasses(frame))
return false;
+ frame->latency_info = active_tree_->GetLatencyInfo();
+
// If we return true, then we expect DrawLayers() to be called before this
// function is called again.
return true;
@@ -1019,6 +1021,7 @@ CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const {
return metadata;
metadata.root_scroll_offset = RootScrollLayer()->TotalScrollOffset();
+ metadata.latency_info = active_tree_->GetLatencyInfo();
return metadata;
}
@@ -1118,7 +1121,9 @@ 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(frame.latency_info);
+ active_tree_->ClearLatencyInfo();
jamesr 2013/04/19 01:25:38 do we want to clear the latency info if the swap f
+ return result;
}
void LayerTreeHostImpl::EnableVSyncNotification(bool enable) {

Powered by Google App Engine
This is Rietveld 408576698