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

Side by Side Diff: content/browser/aura/software_browser_compositor_output_surface.cc

Issue 23694031: Fix race conditions in window snapshot code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Nit Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/aura/software_browser_compositor_output_surface.h" 5 #include "content/browser/aura/software_browser_compositor_output_surface.h"
6 6
7 #include "base/message_loop/message_loop.h"
7 #include "base/time/time.h" 8 #include "base/time/time.h"
8 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
9 #include "cc/output/software_output_device.h" 10 #include "cc/output/software_output_device.h"
10 #include "content/browser/renderer_host/render_widget_host_impl.h" 11 #include "content/browser/renderer_host/render_widget_host_impl.h"
11 #include "ui/events/latency_info.h" 12 #include "ui/events/latency_info.h"
12 13
13 namespace content { 14 namespace content {
14 15
15 SoftwareBrowserCompositorOutputSurface::SoftwareBrowserCompositorOutputSurface( 16 SoftwareBrowserCompositorOutputSurface::SoftwareBrowserCompositorOutputSurface(
16 scoped_ptr<cc::SoftwareOutputDevice> software_device) 17 scoped_ptr<cc::SoftwareOutputDevice> software_device)
17 : cc::OutputSurface(software_device.Pass()) {} 18 : cc::OutputSurface(software_device.Pass()) {}
18 19
19 void SoftwareBrowserCompositorOutputSurface::SwapBuffers( 20 void SoftwareBrowserCompositorOutputSurface::SwapBuffers(
20 cc::CompositorFrame* frame) { 21 cc::CompositorFrame* frame) {
21 ui::LatencyInfo latency_info = frame->metadata.latency_info; 22 ui::LatencyInfo latency_info = frame->metadata.latency_info;
22 latency_info.AddLatencyNumber( 23 latency_info.AddLatencyNumber(
23 ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0); 24 ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0);
24 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); 25
26 base::MessageLoop::current()->PostTask(
27 FROM_HERE,
28 base::Bind(
29 &RenderWidgetHostImpl::CompositorFrameDrawn,
30 latency_info));
25 } 31 }
26 32
27 } // namespace content 33 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698