| 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 bd16b415de6df300e71e0a081beeb1124dca0438..fde15261b0c2dacf8f50277716cb473ab49fb8ea 100644
|
| --- a/content/browser/gpu/gpu_process_host_ui_shim.cc
|
| +++ b/content/browser/gpu/gpu_process_host_ui_shim.cc
|
| @@ -43,13 +43,6 @@ namespace {
|
| #undef DestroyAll
|
| #endif
|
|
|
| -#if defined(OS_MACOSX)
|
| -void OnSurfaceDisplayedCallback(int output_surface_id) {
|
| - content::ImageTransportFactory::GetInstance()->OnSurfaceDisplayed(
|
| - output_surface_id);
|
| -}
|
| -#endif
|
| -
|
| base::LazyInstance<IDMap<GpuProcessHostUIShim> > g_hosts_by_id =
|
| LAZY_INSTANCE_INITIALIZER;
|
|
|
| @@ -247,9 +240,7 @@ void GpuProcessHostUIShim::OnAcceleratedSurfaceBuffersSwapped(
|
| bool should_not_show_frame =
|
| content::ImageTransportFactory::GetInstance()
|
| ->SurfaceShouldNotShowFramesAfterSuspendForRecycle(params.surface_id);
|
| - if (should_not_show_frame) {
|
| - OnSurfaceDisplayedCallback(params.surface_id);
|
| - } else {
|
| + if (!should_not_show_frame) {
|
| gfx::AcceleratedWidget native_widget =
|
| content::GpuSurfaceTracker::Get()->AcquireNativeWidget(
|
| params.surface_id);
|
| @@ -273,13 +264,16 @@ void GpuProcessHostUIShim::OnAcceleratedSurfaceBuffersSwapped(
|
| DLOG(ERROR) << "Unrecognized accelerated frame type.";
|
| return;
|
| }
|
| - ui::AcceleratedWidgetMacGotAcceleratedFrame(
|
| - native_widget, ca_context_id, io_surface, params.latency_info,
|
| - params.size, params.scale_factor, params.damage_rect,
|
| - base::Bind(&OnSurfaceDisplayedCallback, params.surface_id),
|
| - &ack_params.disable_throttling, &ack_params.renderer_id,
|
| - &ack_params.vsync_timebase, &ack_params.vsync_interval);
|
| +
|
| + ui::AcceleratedWidgetMacGotFrame(native_widget, ca_context_id, io_surface,
|
| + params.size, params.scale_factor,
|
| + &ack_params.vsync_timebase,
|
| + &ack_params.vsync_interval);
|
| }
|
| +
|
| + content::ImageTransportFactory::GetInstance()->OnGpuSwapBuffersCompleted(
|
| + params.surface_id, params.latency_info, gfx::SwapResult::SWAP_ACK);
|
| +
|
| Send(new AcceleratedSurfaceMsg_BufferPresented(params.route_id, ack_params));
|
| }
|
| #endif
|
|
|