| Index: content/browser/gpu/gpu_process_host_ui_shim.cc
|
| diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc
|
| index 4a991e0af92c147bc32184c5c592fe9865899c84..d1f35dd2f9b313300793666b0e188c1e37cfdfcd 100644
|
| --- a/content/browser/gpu/gpu_process_host_ui_shim.cc
|
| +++ b/content/browser/gpu/gpu_process_host_ui_shim.cc
|
| @@ -31,6 +31,11 @@
|
| #include <gdk/gdkx.h> // NOLINT
|
| #endif
|
|
|
| +// From gl2/gl2ext.h.
|
| +#ifndef GL_MAILBOX_SIZE_CHROMIUM
|
| +#define GL_MAILBOX_SIZE_CHROMIUM 64
|
| +#endif
|
| +
|
| namespace content {
|
|
|
| namespace {
|
| @@ -302,8 +307,14 @@ void GpuProcessHostUIShim::OnAcceleratedSurfaceNew(
|
| params.surface_id);
|
| if (!view)
|
| return;
|
| +
|
| + if (params.mailbox_name.length() &&
|
| + params.mailbox_name.length() != GL_MAILBOX_SIZE_CHROMIUM)
|
| + return;
|
| +
|
| view->AcceleratedSurfaceNew(
|
| - params.width, params.height, params.surface_handle);
|
| + params.width, params.height, params.surface_handle,
|
| + params.mailbox_name);
|
| }
|
|
|
| static base::TimeDelta GetSwapDelay() {
|
| @@ -323,7 +334,9 @@ void GpuProcessHostUIShim::OnAcceleratedSurfaceBuffersSwapped(
|
|
|
| ScopedSendOnIOThread delayed_send(
|
| host_id_,
|
| - new AcceleratedSurfaceMsg_BufferPresented(params.route_id, false, 0));
|
| + new AcceleratedSurfaceMsg_BufferPresented(params.route_id,
|
| + params.surface_handle,
|
| + 0));
|
|
|
| RenderWidgetHostViewPort* view = GetRenderWidgetHostViewFromSurfaceID(
|
| params.surface_id);
|
| @@ -347,7 +360,9 @@ void GpuProcessHostUIShim::OnAcceleratedSurfacePostSubBuffer(
|
|
|
| ScopedSendOnIOThread delayed_send(
|
| host_id_,
|
| - new AcceleratedSurfaceMsg_BufferPresented(params.route_id, false, 0));
|
| + new AcceleratedSurfaceMsg_BufferPresented(params.route_id,
|
| + params.surface_handle,
|
| + 0));
|
|
|
| RenderWidgetHostViewPort* view =
|
| GetRenderWidgetHostViewFromSurfaceID(params.surface_id);
|
| @@ -378,7 +393,7 @@ void GpuProcessHostUIShim::OnAcceleratedSurfaceRelease(
|
| params.surface_id);
|
| if (!view)
|
| return;
|
| - view->AcceleratedSurfaceRelease(params.identifier);
|
| + view->AcceleratedSurfaceRelease();
|
| }
|
|
|
| void GpuProcessHostUIShim::OnVideoMemoryUsageStatsReceived(
|
|
|