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

Unified Diff: content/browser/aura/software_browser_compositor_output_surface.cc

Issue 100443006: Remove some LatencyInfo merging code path (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years 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: content/browser/aura/software_browser_compositor_output_surface.cc
diff --git a/content/browser/aura/software_browser_compositor_output_surface.cc b/content/browser/aura/software_browser_compositor_output_surface.cc
index 070a6365d9f48adfc83e7789e1640bf398657718..6516f93948a81fc173c19da523c1cf2921cc800f 100644
--- a/content/browser/aura/software_browser_compositor_output_surface.cc
+++ b/content/browser/aura/software_browser_compositor_output_surface.cc
@@ -35,15 +35,17 @@ SoftwareBrowserCompositorOutputSurface::
void SoftwareBrowserCompositorOutputSurface::SwapBuffers(
cc::CompositorFrame* frame) {
- ui::LatencyInfo latency_info = frame->metadata.latency_info;
- latency_info.AddLatencyNumber(
- ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0);
-
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(
- &RenderWidgetHostImpl::CompositorFrameDrawn,
- latency_info));
+ // TODO(miletus) : Convert RenderWidgetHostImpl::CompositorFrameDrawn() to
+ // take std::vector<ui::LatencyInfo> directly so we only post the task once.
danakj 2013/12/20 19:27:37 One question here, should we merge the LatencyInfo
Yufeng Shen (Slow to review) 2013/12/20 19:36:32 It depends on what CompositorFrameDrawn() does wit
+ for (size_t i = 0; i < frame->metadata.latency_info.size(); i++) {
+ frame->metadata.latency_info[i].AddLatencyNumber(
+ ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0);
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(
+ &RenderWidgetHostImpl::CompositorFrameDrawn,
+ frame->metadata.latency_info[i]));
+ }
gfx::VSyncProvider* vsync_provider = software_device()->GetVSyncProvider();
if (vsync_provider) {
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698