| 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 b7b63ff39a370cc3d87e1489d3dd03be3dbf7c45..4ed37fd5414fea7c26ea5b19ad4e6f96cd1f3429 100644
|
| --- a/content/browser/gpu/gpu_process_host_ui_shim.cc
|
| +++ b/content/browser/gpu/gpu_process_host_ui_shim.cc
|
| @@ -22,10 +22,6 @@
|
| #include "content/common/gpu/gpu_messages.h"
|
| #include "content/public/browser/browser_thread.h"
|
|
|
| -#if defined(OS_MACOSX)
|
| -#include "content/browser/compositor/browser_compositor_view_mac.h"
|
| -#endif
|
| -
|
| #if defined(USE_OZONE)
|
| #include "ui/ozone/public/gpu_platform_support_host.h"
|
| #include "ui/ozone/public/ozone_platform.h"
|
| @@ -33,6 +29,17 @@
|
|
|
| namespace content {
|
|
|
| +// Forward-definition of the parts of BrowserCompositorCALayerTreeMac that are
|
| +// needed (the header cannot be included here because it uses Objective C).
|
| +#if defined(OS_MACOSX)
|
| +void BrowserCompositorCALayerTreeMacGotAcceleratedFrame(
|
| + gfx::AcceleratedWidget widget,
|
| + uint64 surface_handle, int surface_id,
|
| + const std::vector<ui::LatencyInfo>& latency_info,
|
| + gfx::Size pixel_size, float scale_factor,
|
| + bool* disable_throttling, int* renderer_id);
|
| +#endif
|
| +
|
| namespace {
|
|
|
| // One of the linux specific headers defines this as a macro.
|
| @@ -257,17 +264,20 @@ void GpuProcessHostUIShim::OnAcceleratedSurfaceBuffersSwapped(
|
|
|
| // On Mac with delegated rendering, accelerated surfaces are not necessarily
|
| // associated with a RenderWidgetHostViewBase.
|
| + AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
|
| DCHECK(IsDelegatedRendererEnabled());
|
| gfx::AcceleratedWidget native_widget =
|
| content::GpuSurfaceTracker::Get()->AcquireNativeWidget(params.surface_id);
|
| - BrowserCompositorViewMac::GotAcceleratedFrame(native_widget,
|
| - params.surface_handle,
|
| - params.surface_id,
|
| - params.latency_info,
|
| - params.size,
|
| - params.scale_factor,
|
| - host_id_,
|
| - params.route_id);
|
| + BrowserCompositorCALayerTreeMacGotAcceleratedFrame(
|
| + native_widget,
|
| + params.surface_handle,
|
| + params.surface_id,
|
| + params.latency_info,
|
| + params.size,
|
| + params.scale_factor,
|
| + &ack_params.disable_throttling,
|
| + &ack_params.renderer_id);
|
| + Send(new AcceleratedSurfaceMsg_BufferPresented(params.route_id, ack_params));
|
| #else
|
| NOTREACHED();
|
| #endif
|
|
|