Revert "Fix OSR resize issue when multiple monitors have different scale factors (fixes issue #3240)"

This reverts commit 9e416a7921bb52eaa96b03b1e9d3c128a8d5e669.

Reverted due to compile error.
This commit is contained in:
Marshall Greenblatt 2022-01-14 12:04:06 -05:00
parent 9e416a7921
commit 17d51ceed0
2 changed files with 2 additions and 11 deletions

View File

@ -1467,13 +1467,8 @@ void CefRenderWidgetHostViewOSR::OnPaint(const gfx::Rect& damage_rect,
rcList, pixels, pixel_size.width(), pixel_size.height());
// Release the resize hold when we reach the desired size.
if (hold_resize_) {
DCHECK_GT(cached_scale_factor_, 0);
gfx::Size expected_size =
gfx::ScaleToCeiledSize(GetViewBounds().size(), cached_scale_factor_);
if (pixel_size == expected_size)
if (hold_resize_ && pixel_size == SizeInPixels())
ReleaseResizeHold();
}
}
ui::Layer* CefRenderWidgetHostViewOSR::GetRootLayer() const {
@ -1578,7 +1573,6 @@ bool CefRenderWidgetHostViewOSR::ResizeRootLayer() {
// The size has changed. Avoid resizing again until ReleaseResizeHold() is
// called.
hold_resize_ = true;
cached_scale_factor_ = GetCurrentDeviceScaleFactor();
return true;
}
} else if (!pending_resize_) {
@ -1592,7 +1586,6 @@ bool CefRenderWidgetHostViewOSR::ResizeRootLayer() {
void CefRenderWidgetHostViewOSR::ReleaseResizeHold() {
DCHECK(hold_resize_);
hold_resize_ = false;
cached_scale_factor_ = -1;
if (pending_resize_) {
pending_resize_ = false;
CEF_POST_TASK(CEF_UIT,

View File

@ -375,8 +375,6 @@ class CefRenderWidgetHostViewOSR
bool hold_resize_ = false;
bool pending_resize_ = false;
float cached_scale_factor_ = 0.0f;
// The associated Model. While |this| is being Destroyed,
// |render_widget_host_| is NULL and the message loop is run one last time
// Message handlers must check for a NULL |render_widget_host_|.