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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 81533002: Use LatencyInfoSwapPromise to track LatencyInfo through compositor (Closed) Base URL: http://git.chromium.org/chromium/src.git@swap_promise_2
Patch Set: fix typo 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 | « cc/trees/layer_tree_impl.cc ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index fe64d9240c1ca08a6ab3fbb4bb6cd3e3cea82514..bfa357d59dc32dfdb8fedb174052cb2bd94a37ca 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -14,6 +14,7 @@
#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/worker_pool.h"
+#include "cc/base/latency_info_swap_promise.h"
#include "cc/layers/delegated_frame_provider.h"
#include "cc/layers/delegated_renderer_layer.h"
#include "cc/layers/layer.h"
@@ -779,8 +780,11 @@ void RenderWidgetHostViewAndroid::OnSwapCompositorFrame(
texture_size_in_layer_ = frame->gl_frame_data->size;
ComputeContentsSize(frame->metadata);
- if (layer_->layer_tree_host())
- layer_->layer_tree_host()->SetLatencyInfo(frame->metadata.latency_info);
+ if (layer_->layer_tree_host()) {
+ scoped_ptr<cc::SwapPromise> swap_promise(
+ new cc::LatencyInfoSwapPromise(frame->metadata.latency_info));
+ layer_->layer_tree_host()->QueueSwapPromise(swap_promise.Pass());
+ }
BuffersSwapped(frame->gl_frame_data->mailbox, output_surface_id, callback);
}
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698