moves setsize call to osr renderwidgethostview
This commit is contained in:
parent
fec5a7d67a
commit
37de2301f7
3 changed files with 14 additions and 9 deletions
|
@ -371,6 +371,8 @@ OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView(
|
|||
compositor_->SetRootLayer(root_layer_.get());
|
||||
#endif
|
||||
|
||||
native_window_->AddObserver(this);
|
||||
|
||||
ResizeRootLayer();
|
||||
}
|
||||
|
||||
|
@ -916,4 +918,10 @@ void OffScreenRenderWidgetHostView::ResizeRootLayer() {
|
|||
GetCompositor()->SetScaleAndSize(scale_factor_, size_in_pixels);
|
||||
}
|
||||
|
||||
void OffScreenRenderWidgetHostView::OnWindowResize() {
|
||||
// In offscreen mode call RenderWidgetHostView's SetSize explicitly
|
||||
auto size = native_window_->GetSize();
|
||||
SetSize(size);
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue