mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
fix: offscreen rendering with correct screen info. (#48730)
fix: osr use correct screen info.
This commit is contained in:
@@ -820,6 +820,13 @@ class WebContents final : public ExclusiveAccessContext,
|
||||
bool offscreen_use_shared_texture_ = false;
|
||||
std::string offscreen_shared_texture_pixel_format_ = "argb";
|
||||
|
||||
// TODO(reito): 0.0f means the device scale factor is not set, it's a
|
||||
// migration of the breaking change so that we can read the device scale
|
||||
// factor from physical primary screen's info. In Electron 42, we need to set
|
||||
// this to 1.0f so that the offscreen rendering use 1.0 as default when
|
||||
// `deviceScaleFactor` is not specified in webPreferences.
|
||||
float offscreen_device_scale_factor_ = 0.0f;
|
||||
|
||||
// Whether window is fullscreened by HTML5 api.
|
||||
bool html_fullscreen_ = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user