31 lines
1.5 KiB
Diff
31 lines
1.5 KiB
Diff
diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
|
|
index 0d13a9a16d65..3eeca6a01e6f 100644
|
|
--- content/browser/renderer_host/browser_compositor_view_mac.h
|
|
+++ content/browser/renderer_host/browser_compositor_view_mac.h
|
|
@@ -59,6 +59,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
|
|
|
|
// These will not return nullptr until Destroy is called.
|
|
DelegatedFrameHost* GetDelegatedFrameHost();
|
|
+ ui::Layer* GetRootLayer() { return root_layer_.get(); }
|
|
+ ui::Compositor* GetCompositor();
|
|
|
|
// Ensure that the currect compositor frame be cleared (even if it is
|
|
// potentially visible).
|
|
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
|
|
index f9e9ad67c887..e0d0264299d7 100644
|
|
--- content/browser/renderer_host/browser_compositor_view_mac.mm
|
|
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
|
|
@@ -244,6 +244,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() {
|
|
return delegated_frame_host_.get();
|
|
}
|
|
|
|
+ui::Compositor* BrowserCompositorMac::GetCompositor() {
|
|
+ if (recyclable_compositor_)
|
|
+ return recyclable_compositor_->compositor();
|
|
+ return nullptr;
|
|
+}
|
|
+
|
|
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
|