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-11-03 02:15:09 +01:00
|
|
|
index 731c8c429bc2..77bea57ba5d6 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-11-03 02:15:09 +01:00
|
|
|
@@ -62,6 +62,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
|
|
|
|
2017-09-06 23:40:58 +02:00
|
|
|
// Ensure that the currect compositor frame be cleared (even if it is
|
|
|
|
// potentially visible).
|
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-11-03 02:15:09 +01:00
|
|
|
index 59128ca41174..2ca8b5c3d5ea 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-09-04 11:43:21 +02:00
|
|
|
@@ -84,6 +84,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-07-02 19:11:49 +02:00
|
|
|
void BrowserCompositorMac::ClearCompositorFrame() {
|
|
|
|
// Make sure that we no longer hold a compositor lock by un-suspending the
|
|
|
|
// compositor. This ensures that we are able to swap in a new blank frame to
|