2016-07-06 21:34:09 +02:00
|
|
|
diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
|
2018-06-08 18:53:10 +02:00
|
|
|
index 18c9e514c3b5..e3730ce40046 100644
|
2016-07-06 21:34:09 +02:00
|
|
|
--- content/browser/renderer_host/browser_compositor_view_mac.h
|
|
|
|
+++ content/browser/renderer_host/browser_compositor_view_mac.h
|
2018-06-01 21:16:26 +02:00
|
|
|
@@ -58,6 +58,7 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
|
2016-07-21 23:21:32 +02:00
|
|
|
|
|
|
|
// These will not return nullptr until Destroy is called.
|
|
|
|
DelegatedFrameHost* GetDelegatedFrameHost();
|
|
|
|
+ ui::Layer* GetRootLayer() { return root_layer_.get(); }
|
2016-07-06 21:34:09 +02:00
|
|
|
|
2017-09-06 23:40:58 +02:00
|
|
|
// Ensure that the currect compositor frame be cleared (even if it is
|
|
|
|
// potentially visible).
|
2018-06-01 21:16:26 +02:00
|
|
|
@@ -69,6 +70,7 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
|
2018-05-20 15:51:42 +02:00
|
|
|
// no valid frame is available.
|
|
|
|
const gfx::CALayerParams* GetLastCALayerParams() const;
|
2017-09-06 23:40:58 +02:00
|
|
|
|
2016-07-06 21:34:09 +02:00
|
|
|
+ ui::Compositor* GetCompositor();
|
2018-02-15 01:12:09 +01:00
|
|
|
gfx::AcceleratedWidget GetAcceleratedWidget();
|
2017-04-20 21:28:17 +02:00
|
|
|
void DidCreateNewRendererCompositorFrameSink(
|
2018-02-15 01:12:09 +01:00
|
|
|
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink);
|
2016-07-06 21:34:09 +02:00
|
|
|
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
|
2018-06-08 18:53:10 +02:00
|
|
|
index 65f1326ef578..446e93703e7b 100644
|
2016-07-06 21:34:09 +02:00
|
|
|
--- content/browser/renderer_host/browser_compositor_view_mac.mm
|
|
|
|
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
|
2018-06-01 21:16:26 +02:00
|
|
|
@@ -240,6 +240,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
|
2016-08-31 13:25:56 +02:00
|
|
|
g_spare_recyclable_compositors.Get().clear();
|
2016-07-06 21:34:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
+ui::Compositor* BrowserCompositorMac::GetCompositor() {
|
|
|
|
+ if (recyclable_compositor_)
|
|
|
|
+ return recyclable_compositor_->compositor();
|
|
|
|
+ return nullptr;
|
|
|
|
+}
|
|
|
|
+
|
2018-02-15 01:12:09 +01:00
|
|
|
gfx::AcceleratedWidget BrowserCompositorMac::GetAcceleratedWidget() {
|
|
|
|
if (recyclable_compositor_) {
|
|
|
|
return recyclable_compositor_->accelerated_widget_mac()
|