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..4f926b33436f8d7df9780079eb6cd6474151f8de 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,20 @@ |
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) |
+class BrowserCompositorCALayerTreeMac { |
+ public: |
+ static void GotAcceleratedFrame( |
+ 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 |
tapted
2014/10/17 00:04:36
I'm probably unnecessarily scared by this :). I'd
ccameron
2014/10/17 00:26:53
I was wondering which of the horrors was worse. Gi
|
+ |
namespace { |
// One of the linux specific headers defines this as a macro. |
@@ -257,17 +267,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); |
+ BrowserCompositorCALayerTreeMac::GotAcceleratedFrame( |
+ 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 |