cef/patch/patches/browser_compositor_mac.patch

31 lines
1.5 KiB
Diff
Raw Normal View History

diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
index 731c8c429bc2..77bea57ba5d6 100644
--- content/browser/renderer_host/browser_compositor_view_mac.h
+++ content/browser/renderer_host/browser_compositor_view_mac.h
@@ -62,6 +62,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 59128ca41174..2ca8b5c3d5ea 100644
--- content/browser/renderer_host/browser_compositor_view_mac.mm
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -84,6 +84,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