summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
authorjbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-14 18:19:47 +0000
committerjbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-14 18:19:47 +0000
commit85c2ff9b06f2b566b09e318c0242b26fab3f9f5b (patch)
tree0e12d96e23c4f0b144b22197c55a73d28e4266c9 /content/browser
parent9af3b284cce562fd94b6a3b34c61449a5c524f94 (diff)
downloadchromium_src-85c2ff9b06f2b566b09e318c0242b26fab3f9f5b.zip
chromium_src-85c2ff9b06f2b566b09e318c0242b26fab3f9f5b.tar.gz
chromium_src-85c2ff9b06f2b566b09e318c0242b26fab3f9f5b.tar.bz2
Plumb vsync info from AcceleratedPresenter to RenderWidgetHostImpl
BUG=137792 Review URL: https://chromiumcodereview.appspot.com/10820041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151514 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/gpu/gpu_process_host.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 7a13cbf..a89ae70 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);