| Index: content/browser/renderer_host/render_widget_helper_mac.mm
|
| diff --git a/content/browser/renderer_host/render_widget_helper_mac.mm b/content/browser/renderer_host/render_widget_helper_mac.mm
|
| index 1a1725d70b123d32f51118e0fa74887565030a9a..7fff9a7c35433bf9b3b328c44ca9d644e3b9d4c8 100644
|
| --- a/content/browser/renderer_host/render_widget_helper_mac.mm
|
| +++ b/content/browser/renderer_host/render_widget_helper_mac.mm
|
| @@ -14,10 +14,10 @@
|
| #include "content/common/gpu/gpu_messages.h"
|
| #include "content/common/gpu/surface_handle_types_mac.h"
|
|
|
| -namespace {
|
| +namespace content {
|
|
|
| -void OnNativeSurfaceBuffersSwappedOnUIThread(
|
| - base::ScopedCFTypeRef<IOSurfaceRef> io_surface,
|
| +// static
|
| +void RenderWidgetHelper::OnNativeSurfaceBuffersSwappedOnUIThread(
|
| const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params) {
|
| DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
|
| gfx::AcceleratedWidget native_widget =
|
| @@ -31,36 +31,4 @@ void OnNativeSurfaceBuffersSwappedOnUIThread(
|
| withScaleFactor:params.scale_factor];
|
| }
|
|
|
| -} // namespace
|
| -
|
| -namespace content {
|
| -
|
| -void RenderWidgetHelper::OnNativeSurfaceBuffersSwappedOnIOThread(
|
| - GpuProcessHost* gpu_process_host,
|
| - const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| -
|
| - // Immediately acknowledge this frame on the IO thread instead of the UI
|
| - // thread. The UI thread will wait on the GPU process. If the UI thread
|
| - // were to be responsible for acking swaps, then there would be a cycle
|
| - // and a potential deadlock.
|
| - // TODO(ccameron): This immediate ack circumvents GPU back-pressure that
|
| - // is necessary to throttle renderers. Fix that.
|
| - AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
|
| - ack_params.sync_point = 0;
|
| - ack_params.renderer_id = 0;
|
| - gpu_process_host->Send(new AcceleratedSurfaceMsg_BufferPresented(
|
| - params.route_id, ack_params));
|
| -
|
| - // Open the IOSurface handle before returning, to ensure that it is not
|
| - // closed as soon as the frame is acknowledged.
|
| - base::ScopedCFTypeRef<IOSurfaceRef> io_surface(IOSurfaceLookup(
|
| - static_cast<uint32>(params.surface_handle)));
|
| -
|
| - BrowserThread::PostTask(
|
| - BrowserThread::UI,
|
| - FROM_HERE,
|
| - base::Bind(&OnNativeSurfaceBuffersSwappedOnUIThread, io_surface, params));
|
| -}
|
| -
|
| } // namespace content
|
|
|