From ab5e51c20901da5f94b4018f3433ac0c21aaa5d4 Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 23 Sep 2016 20:27:05 +0200 Subject: [PATCH] fixes software rendering on macos and small resizing addition --- atom/browser/osr/osr_render_widget_host_view.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/atom/browser/osr/osr_render_widget_host_view.cc b/atom/browser/osr/osr_render_widget_host_view.cc index aa12cdcb83a2..24e647c95b23 100644 --- a/atom/browser/osr/osr_render_widget_host_view.cc +++ b/atom/browser/osr/osr_render_widget_host_view.cc @@ -367,9 +367,9 @@ OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView( new ui::Compositor(content::GetContextFactory(), base::ThreadTaskRunnerHandle::Get())); compositor_->SetAcceleratedWidget(native_window_->GetAcceleratedWidget()); - compositor_->SetDelegate(this); compositor_->SetRootLayer(root_layer_.get()); #endif + GetCompositor()->SetDelegate(this); native_window_->AddObserver(this); @@ -445,6 +445,9 @@ void OffScreenRenderWidgetHostView::SetSize(const gfx::Size& size) { size_ = size; ResizeRootLayer(); + if (render_widget_host_) + render_widget_host_->WasResized(); + GetDelegatedFrameHost()->WasResized(); } void OffScreenRenderWidgetHostView::SetBounds(const gfx::Rect& new_bounds) {