fixes not expected scale factor change
This commit is contained in:
parent
9f682ee36b
commit
af2c5d1845
1 changed files with 4 additions and 2 deletions
|
@ -858,6 +858,8 @@ std::unique_ptr<cc::SoftwareOutputDevice>
|
||||||
DCHECK(!copy_frame_generator_);
|
DCHECK(!copy_frame_generator_);
|
||||||
DCHECK(!software_output_device_);
|
DCHECK(!software_output_device_);
|
||||||
|
|
||||||
|
ResizeRootLayer();
|
||||||
|
|
||||||
software_output_device_ = new OffScreenOutputDevice(
|
software_output_device_ = new OffScreenOutputDevice(
|
||||||
transparent_,
|
transparent_,
|
||||||
base::Bind(&OffScreenRenderWidgetHostView::OnPaint,
|
base::Bind(&OffScreenRenderWidgetHostView::OnPaint,
|
||||||
|
@ -1127,8 +1129,8 @@ void OffScreenRenderWidgetHostView::InvalidateBounds(const gfx::Rect& bounds) {
|
||||||
void OffScreenRenderWidgetHostView::ResizeRootLayer() {
|
void OffScreenRenderWidgetHostView::ResizeRootLayer() {
|
||||||
SetupFrameRate(false);
|
SetupFrameRate(false);
|
||||||
|
|
||||||
const float orgScaleFactor = scale_factor_;
|
const float compositorScaleFactor = GetCompositor()->device_scale_factor();
|
||||||
const bool scaleFactorDidChange = (orgScaleFactor != scale_factor_);
|
const bool scaleFactorDidChange = (compositorScaleFactor != scale_factor_);
|
||||||
|
|
||||||
gfx::Size size;
|
gfx::Size size;
|
||||||
if (!IsPopupWidget())
|
if (!IsPopupWidget())
|
||||||
|
|
Loading…
Reference in a new issue