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
|
2020-10-08 21:54:42 +02:00
|
|
|
index 202bd7aa0d57..20067b203d96 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
|
2020-03-04 01:29:39 +01:00
|
|
|
@@ -58,6 +58,8 @@ 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(); }
|
2018-07-02 19:11:49 +02:00
|
|
|
+ ui::Compositor* GetCompositor();
|
2016-07-06 21:34:09 +02:00
|
|
|
|
2018-11-30 23:21:07 +01:00
|
|
|
// Force a new surface id to be allocated. Returns true if the
|
|
|
|
// RenderWidgetHostImpl sent the resulting surface id to the renderer.
|
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
|
2020-12-02 23:31:49 +01:00
|
|
|
index a82ed2d5bbcd..59fabfcdfff7 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
|
2020-10-08 21:54:42 +02:00
|
|
|
@@ -86,6 +86,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() {
|
2018-07-02 19:11:49 +02:00
|
|
|
return delegated_frame_host_.get();
|
2016-07-06 21:34:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
+ui::Compositor* BrowserCompositorMac::GetCompositor() {
|
|
|
|
+ if (recyclable_compositor_)
|
|
|
|
+ return recyclable_compositor_->compositor();
|
|
|
|
+ return nullptr;
|
|
|
|
+}
|
|
|
|
+
|
2018-11-30 23:21:07 +01:00
|
|
|
bool BrowserCompositorMac::ForceNewSurfaceId() {
|
|
|
|
dfh_local_surface_id_allocator_.GenerateId();
|
|
|
|
delegated_frame_host_->EmbedSurface(
|