diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-11-20 10:33:36 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-11-22 11:45:12 +0000 |
commit | be59a35641616a4cf23c4a13fa0632624b021c1b (patch) | |
tree | 9da183258bdf9cc413f7562079d25ace6955467f /chromium/content/browser/renderer_host/browser_compositor_view_mac.mm | |
parent | d702e4b6a64574e97fc7df8fe3238cde70242080 (diff) | |
download | qtwebengine-chromium-be59a35641616a4cf23c4a13fa0632624b021c1b.tar.gz |
BASELINE: Update Chromium to 62.0.3202.101
Change-Id: I2d5eca8117600df6d331f6166ab24d943d9814ac
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/content/browser/renderer_host/browser_compositor_view_mac.mm')
-rw-r--r-- | chromium/content/browser/renderer_host/browser_compositor_view_mac.mm | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/chromium/content/browser/renderer_host/browser_compositor_view_mac.mm b/chromium/content/browser/renderer_host/browser_compositor_view_mac.mm index 278c7021a2f..428bef1ff74 100644 --- a/chromium/content/browser/renderer_host/browser_compositor_view_mac.mm +++ b/chromium/content/browser/renderer_host/browser_compositor_view_mac.mm @@ -104,7 +104,8 @@ RecyclableCompositorMac::RecyclableCompositorMac() content::GetContextFactory(), content::GetContextFactoryPrivate(), ui::WindowResizeHelperMac::Get()->task_runner(), - false /* enable_surface_synchronization */) { + false /* enable_surface_synchronization */, + false /* enable_pixel_canvas */) { compositor_.SetAcceleratedWidget( accelerated_widget_mac_->accelerated_widget()); Suspend(); @@ -215,6 +216,17 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() { return delegated_frame_host_.get(); } +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 + // replace any old content. + // https://crbug.com/739621 + if (recyclable_compositor_) + recyclable_compositor_->Unsuspend(); + if (delegated_frame_host_) + delegated_frame_host_->ClearDelegatedFrame(); +} + void BrowserCompositorMac::CopyCompleted( base::WeakPtr<BrowserCompositorMac> browser_compositor, const ReadbackRequestCallback& callback, @@ -272,7 +284,7 @@ void BrowserCompositorMac::CopyFromCompositingSurfaceToVideoFrame( } void BrowserCompositorMac::DidCreateNewRendererCompositorFrameSink( - cc::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink) { + viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink) { renderer_compositor_frame_sink_ = renderer_compositor_frame_sink; delegated_frame_host_->DidCreateNewRendererCompositorFrameSink( renderer_compositor_frame_sink_); @@ -295,7 +307,7 @@ void BrowserCompositorMac::SubmitCompositorFrame( std::move(frame)); } -void BrowserCompositorMac::OnDidNotProduceFrame(const cc::BeginFrameAck& ack) { +void BrowserCompositorMac::OnDidNotProduceFrame(const viz::BeginFrameAck& ack) { delegated_frame_host_->DidNotProduceFrame(ack); } @@ -449,4 +461,10 @@ bool BrowserCompositorMac::IsAutoResizeEnabled() const { return false; } +ui::Compositor* BrowserCompositorMac::CompositorForTesting() const { + if (recyclable_compositor_) + return recyclable_compositor_->compositor(); + return nullptr; +} + } // namespace content |