2018-10-24 18:24:11 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-09-21 00:30:26 +00:00
|
|
|
From: Cheng Zhao <zcbenz@gmail.com>
|
|
|
|
Date: Thu, 20 Sep 2018 17:45:14 -0700
|
|
|
|
Subject: browser_compositor_mac.patch
|
|
|
|
|
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.h b/content/browser/renderer_host/browser_compositor_view_mac.h
|
2019-01-12 01:00:43 +00:00
|
|
|
index 71a9e1024b6055b1b1cc1e51d898a030e7f72111..479110fef40183c0d5d301686c1e8ae754317b29 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/content/browser/renderer_host/browser_compositor_view_mac.h
|
|
|
|
+++ b/content/browser/renderer_host/browser_compositor_view_mac.h
|
2018-10-24 23:25:48 +00:00
|
|
|
@@ -60,6 +60,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
|
2018-09-14 05:02:16 +00:00
|
|
|
// These will not return nullptr until Destroy is called.
|
|
|
|
DelegatedFrameHost* GetDelegatedFrameHost();
|
|
|
|
|
|
|
|
+ ui::Layer* GetRootLayer() { return root_layer_.get(); }
|
|
|
|
+
|
|
|
|
// Ensure that the currect compositor frame be cleared (even if it is
|
|
|
|
// potentially visible).
|
|
|
|
void ClearCompositorFrame();
|
2018-10-24 23:25:48 +00:00
|
|
|
@@ -70,6 +72,7 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
|
2018-09-14 18:03:43 +00:00
|
|
|
// no valid frame is available.
|
|
|
|
const gfx::CALayerParams* GetLastCALayerParams() const;
|
2018-09-14 05:02:16 +00:00
|
|
|
|
|
|
|
+ ui::Compositor* GetCompositor();
|
|
|
|
void DidCreateNewRendererCompositorFrameSink(
|
|
|
|
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink);
|
2018-09-21 00:30:26 +00:00
|
|
|
void OnDidNotProduceFrame(const viz::BeginFrameAck& ack);
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm
|
2019-01-12 01:00:43 +00:00
|
|
|
index 65670cccb50312a7cf0895ae39db01bc19d42d3d..235303a210fadd7ecfa7d1878df9fc93f2655b38 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/content/browser/renderer_host/browser_compositor_view_mac.mm
|
|
|
|
+++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
|
2018-10-24 23:25:48 +00:00
|
|
|
@@ -79,6 +79,12 @@
|
2018-09-21 00:30:26 +00:00
|
|
|
DCHECK_EQ(1u, num_erased);
|
2018-09-14 05:02:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
+ui::Compositor* BrowserCompositorMac::GetCompositor() {
|
|
|
|
+ if (recyclable_compositor_)
|
|
|
|
+ return recyclable_compositor_->compositor();
|
|
|
|
+ return nullptr;
|
|
|
|
+}
|
|
|
|
+
|
2018-09-21 00:30:26 +00:00
|
|
|
DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() {
|
|
|
|
DCHECK(delegated_frame_host_);
|
|
|
|
return delegated_frame_host_.get();
|