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

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

Issue 2788893004: Renaming gpu swap buffer callbacks and the screenshot latency component. (Closed)
Patch Set: Updating android compositor Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/compositor/software_browser_compositor_output_surface. h" 5 #include "content/browser/compositor/software_browser_compositor_output_surface. h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 cc::OutputSurfaceFrame frame) { 72 cc::OutputSurfaceFrame frame) {
73 DCHECK(client_); 73 DCHECK(client_);
74 base::TimeTicks swap_time = base::TimeTicks::Now(); 74 base::TimeTicks swap_time = base::TimeTicks::Now();
75 for (auto& latency : frame.latency_info) { 75 for (auto& latency : frame.latency_info) {
76 latency.AddLatencyNumberWithTimestamp( 76 latency.AddLatencyNumberWithTimestamp(
77 ui::INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT, 0, 0, swap_time, 1); 77 ui::INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT, 0, 0, swap_time, 1);
78 latency.AddLatencyNumberWithTimestamp( 78 latency.AddLatencyNumberWithTimestamp(
79 ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0, 79 ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0,
80 swap_time, 1); 80 swap_time, 1);
81 } 81 }
82 task_runner_->PostTask(FROM_HERE, 82 task_runner_->PostTask(
83 base::Bind(&RenderWidgetHostImpl::CompositorFrameDrawn, 83 FROM_HERE, base::Bind(&RenderWidgetHostImpl::OnGpuSwapBuffersCompleted,
84 frame.latency_info)); 84 frame.latency_info));
85 85
86 gfx::VSyncProvider* vsync_provider = software_device()->GetVSyncProvider(); 86 gfx::VSyncProvider* vsync_provider = software_device()->GetVSyncProvider();
87 if (vsync_provider) 87 if (vsync_provider)
88 vsync_provider->GetVSyncParameters(update_vsync_parameters_callback_); 88 vsync_provider->GetVSyncParameters(update_vsync_parameters_callback_);
89 89
90 task_runner_->PostTask( 90 task_runner_->PostTask(
91 FROM_HERE, 91 FROM_HERE,
92 base::Bind(&SoftwareBrowserCompositorOutputSurface::SwapBuffersCallback, 92 base::Bind(&SoftwareBrowserCompositorOutputSurface::SwapBuffersCallback,
93 weak_factory_.GetWeakPtr())); 93 weak_factory_.GetWeakPtr()));
94 } 94 }
(...skipping 22 matching lines...) Expand all
117 return 0; 117 return 0;
118 } 118 }
119 119
120 #if defined(OS_MACOSX) 120 #if defined(OS_MACOSX)
121 void SoftwareBrowserCompositorOutputSurface::SetSurfaceSuspendedForRecycle( 121 void SoftwareBrowserCompositorOutputSurface::SetSurfaceSuspendedForRecycle(
122 bool suspended) { 122 bool suspended) {
123 } 123 }
124 #endif 124 #endif
125 125
126 } // namespace content 126 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698