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

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

Issue 11642051: Reland 174257 with fix for win_aura (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 7 years, 12 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
===================================================================
--- content/browser/gpu/gpu_process_host.cc (revision 174804)
+++ content/browser/gpu/gpu_process_host.cc (working copy)
@@ -102,8 +102,8 @@
void AcceleratedSurfaceBuffersSwappedCompletedForGPU(int host_id,
int route_id,
- bool alive,
- uint64 surface_handle) {
+ uint64 surface_handle,
+ bool alive) {
if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
BrowserThread::PostTask(
BrowserThread::IO,
@@ -111,8 +111,8 @@
base::Bind(&AcceleratedSurfaceBuffersSwappedCompletedForGPU,
host_id,
route_id,
- alive,
- surface_handle));
+ surface_handle,
+ alive));
return;
}
@@ -161,19 +161,6 @@
if (interval != base::TimeDelta())
RenderWidgetHostImpl::From(rwh)->UpdateVSyncParameters(timebase, interval);
}
-
-void AcceleratedSurfaceBuffersSwappedCompleted(int host_id,
- int route_id,
- int surface_id,
- uint64 surface_handle,
- bool alive,
- base::TimeTicks timebase,
- base::TimeDelta interval) {
- AcceleratedSurfaceBuffersSwappedCompletedForGPU(host_id, route_id,
- alive, surface_handle);
- AcceleratedSurfaceBuffersSwappedCompletedForRenderer(surface_id, timebase,
- interval);
-}
#endif // defined(OS_WIN)
} // anonymous namespace
@@ -808,7 +795,7 @@
base::ScopedClosureRunner scoped_completion_runner(
base::Bind(&AcceleratedSurfaceBuffersSwappedCompletedForGPU,
host_id_, params.route_id,
- true /* alive */, params.surface_handle));
+ params.surface_handle, true /* alive */));
int render_process_id = 0;
int render_widget_id = 0;
@@ -841,10 +828,17 @@
const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params) {
TRACE_EVENT0("gpu", "GpuProcessHost::OnAcceleratedSurfaceBuffersSwapped");
- base::ScopedClosureRunner scoped_completion_runner(
- base::Bind(&AcceleratedSurfaceBuffersSwappedCompleted,
- host_id_, params.route_id, params.surface_id, params.surface_handle,
- true, base::TimeTicks(), base::TimeDelta()));
+ base::ScopedClosureRunner scoped_present_completion_runner(
+ base::Bind(&AcceleratedSurfaceBuffersSwappedCompletedForRenderer,
+ params.surface_id,
+ base::TimeTicks(),
+ base::TimeDelta()));
+ base::ScopedClosureRunner scoped_copy_completion_runner(
+ base::Bind(&AcceleratedSurfaceBuffersSwappedCompletedForGPU,
+ host_id_,
+ params.route_id,
+ params.surface_handle,
+ true));
gfx::PluginWindowHandle handle =
GpuSurfaceTracker::Get()->GetSurfaceWindowHandle(params.surface_id);
@@ -854,7 +848,8 @@
"surface_id", params.surface_id);
#if defined(USE_AURA)
// This is a content area swap, send it on to the UI thread.
- scoped_completion_runner.Release();
+ scoped_copy_completion_runner.Release();
+ scoped_present_completion_runner.Release();
RouteOnUIThread(GpuHostMsg_AcceleratedSurfaceBuffersSwapped(params));
#endif
return;
@@ -869,15 +864,17 @@
return;
}
- scoped_completion_runner.Release();
+ scoped_copy_completion_runner.Release();
+ scoped_present_completion_runner.Release();
presenter->AsyncPresentAndAcknowledge(
params.size,
params.surface_handle,
- base::Bind(&AcceleratedSurfaceBuffersSwappedCompleted,
+ base::Bind(&AcceleratedSurfaceBuffersSwappedCompletedForGPU,
host_id_,
params.route_id,
- params.surface_id,
- params.surface_handle));
+ params.surface_handle),
+ base::Bind(&AcceleratedSurfaceBuffersSwappedCompletedForRenderer,
+ params.surface_id));
}
void GpuProcessHost::OnAcceleratedSurfacePostSubBuffer(
« 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