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

Unified Diff: trunk/src/cc/trees/layer_tree_host_impl.cc

Issue 96363002: Revert 237857 "Revert 237848 "Use LatencyInfoSwapPromise to trac..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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 | « trunk/src/cc/trees/layer_tree_host.cc ('k') | trunk/src/cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/cc/trees/layer_tree_host_impl.cc
===================================================================
--- trunk/src/cc/trees/layer_tree_host_impl.cc (revision 237886)
+++ trunk/src/cc/trees/layer_tree_host_impl.cc (working copy)
@@ -15,6 +15,7 @@
#include "base/strings/stringprintf.h"
#include "cc/animation/scrollbar_animation_controller.h"
#include "cc/animation/timing_function.h"
+#include "cc/base/latency_info_swap_promise.h"
#include "cc/base/math_util.h"
#include "cc/base/util.h"
#include "cc/debug/benchmark_instrumentation.h"
@@ -474,7 +475,9 @@
void LayerTreeHostImpl::SetLatencyInfoForInputEvent(
const ui::LatencyInfo& latency_info) {
- active_tree()->SetLatencyInfo(latency_info);
+ scoped_ptr<SwapPromise> swap_promise(
+ new LatencyInfoSwapPromise(latency_info));
+ active_tree()->QueueSwapPromise(swap_promise.Pass());
}
void LayerTreeHostImpl::TrackDamageForAllSurfaces(
@@ -1269,7 +1272,6 @@
metadata.root_layer_size = active_tree_->ScrollableSize();
metadata.min_page_scale_factor = active_tree_->min_page_scale_factor();
metadata.max_page_scale_factor = active_tree_->max_page_scale_factor();
- metadata.latency_info = active_tree_->GetLatencyInfo();
if (top_controls_manager_) {
metadata.location_bar_offset =
gfx::Vector2dF(0.f, top_controls_manager_->controls_top_offset());
@@ -1428,9 +1430,8 @@
return false;
}
CompositorFrameMetadata metadata = MakeCompositorFrameMetadata();
+ active_tree()->FinishSwapPromises(&metadata);
renderer_->SwapBuffers(metadata);
- active_tree_->ClearLatencyInfo();
- active_tree()->FinishSwapPromises();
return true;
}
« no previous file with comments | « trunk/src/cc/trees/layer_tree_host.cc ('k') | trunk/src/cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698