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

Unified Diff: content/browser/gpu/gpu_process_host.cc

Issue 10820041: Plumb vsync info from AcceleratedPresenter to RenderWidgetHostImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: offset timebase to Now-space Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/surface/accelerated_surface_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host.cc
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 7a13cbf3d6e7274f0aa81c4c2d65bbf64fe10daa..a89ae701d7d94f5eaef889ce74c1a8c47f6d3b37 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -127,13 +127,16 @@ void AcceleratedSurfaceBuffersSwappedCompletedForGPU(int host_id,
// This sends a ViewMsg_SwapBuffers_ACK directly to the renderer process
// (RenderWidget). This path is currently not used with the threaded compositor.
-void AcceleratedSurfaceBuffersSwappedCompletedForRenderer(int surface_id) {
+void AcceleratedSurfaceBuffersSwappedCompletedForRenderer(
+ int surface_id,
+ base::TimeTicks timebase,
+ base::TimeDelta interval) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
base::Bind(&AcceleratedSurfaceBuffersSwappedCompletedForRenderer,
- surface_id));
+ surface_id, timebase, interval));
return;
}
@@ -150,14 +153,19 @@ void AcceleratedSurfaceBuffersSwappedCompletedForRenderer(int surface_id) {
if (!rwh)
return;
RenderWidgetHostImpl::From(rwh)->AcknowledgeSwapBuffersToRenderer();
+ if (interval != base::TimeDelta())
+ RenderWidgetHostImpl::From(rwh)->UpdateVSyncParameters(timebase, interval);
}
void AcceleratedSurfaceBuffersSwappedCompleted(int host_id,
int route_id,
int surface_id,
- bool alive) {
+ bool alive,
+ base::TimeTicks timebase,
+ base::TimeDelta interval) {
AcceleratedSurfaceBuffersSwappedCompletedForGPU(host_id, route_id, alive);
- AcceleratedSurfaceBuffersSwappedCompletedForRenderer(surface_id);
+ AcceleratedSurfaceBuffersSwappedCompletedForRenderer(surface_id, timebase,
+ interval);
}
} // anonymous namespace
@@ -648,10 +656,8 @@ void GpuProcessHost::OnAcceleratedSurfaceBuffersSwapped(
base::ScopedClosureRunner scoped_completion_runner(
base::Bind(&AcceleratedSurfaceBuffersSwappedCompleted,
- host_id_,
- params.route_id,
- params.surface_id,
- true));
+ host_id_, params.route_id, params.surface_id,
+ true, base::TimeTicks(), base::TimeDelta()));
gfx::PluginWindowHandle handle =
GpuSurfaceTracker::Get()->GetSurfaceWindowHandle(params.surface_id);
« no previous file with comments | « no previous file | ui/surface/accelerated_surface_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698