Merge pull request #8250 from gerhardberger/osr-window-size-fix
Always create offscreen window frameless
This commit is contained in:
commit
6ea1bacc73
2 changed files with 9 additions and 0 deletions
|
@ -90,6 +90,13 @@ Window::Window(v8::Isolate* isolate, v8::Local<v8::Object> wrapper,
|
|||
if (options.Get("transparent", &transparent))
|
||||
web_preferences.Set("transparent", transparent);
|
||||
|
||||
// Offscreen windows are always created frameless.
|
||||
bool offscreen;
|
||||
if (web_preferences.Get("offscreen", &offscreen) && offscreen) {
|
||||
auto window_options = const_cast<mate::Dictionary&>(options);
|
||||
window_options.Set(options::kFrame, false);
|
||||
}
|
||||
|
||||
// Creates the WebContents used by BrowserWindow.
|
||||
web_contents = WebContents::Create(isolate, web_preferences);
|
||||
}
|
||||
|
|
|
@ -12,6 +12,8 @@ when there is nothing happening on a webpage, no frames are generated. The
|
|||
maximum frame rate is 60, because above that there is no benefit, just
|
||||
performance loss.
|
||||
|
||||
**Note:** An offscreen window is always created as a [Frameless Window](../api/frameless-window.md).
|
||||
|
||||
## Two modes of rendering
|
||||
|
||||
### GPU accelerated
|
||||
|
|
Loading…
Reference in a new issue