mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-14 19:20:46 +01:00
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:
parent
9e416a7921
commit
17d51ceed0
@ -1467,14 +1467,9 @@ void CefRenderWidgetHostViewOSR::OnPaint(const gfx::Rect& damage_rect,
|
|||||||
rcList, pixels, pixel_size.width(), pixel_size.height());
|
rcList, pixels, pixel_size.width(), pixel_size.height());
|
||||||
|
|
||||||
// Release the resize hold when we reach the desired size.
|
// Release the resize hold when we reach the desired size.
|
||||||
if (hold_resize_) {
|
if (hold_resize_ && pixel_size == SizeInPixels())
|
||||||
DCHECK_GT(cached_scale_factor_, 0);
|
|
||||||
gfx::Size expected_size =
|
|
||||||
gfx::ScaleToCeiledSize(GetViewBounds().size(), cached_scale_factor_);
|
|
||||||
if (pixel_size == expected_size)
|
|
||||||
ReleaseResizeHold();
|
ReleaseResizeHold();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ui::Layer* CefRenderWidgetHostViewOSR::GetRootLayer() const {
|
ui::Layer* CefRenderWidgetHostViewOSR::GetRootLayer() const {
|
||||||
return root_layer_.get();
|
return root_layer_.get();
|
||||||
@ -1578,7 +1573,6 @@ bool CefRenderWidgetHostViewOSR::ResizeRootLayer() {
|
|||||||
// The size has changed. Avoid resizing again until ReleaseResizeHold() is
|
// The size has changed. Avoid resizing again until ReleaseResizeHold() is
|
||||||
// called.
|
// called.
|
||||||
hold_resize_ = true;
|
hold_resize_ = true;
|
||||||
cached_scale_factor_ = GetCurrentDeviceScaleFactor();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else if (!pending_resize_) {
|
} else if (!pending_resize_) {
|
||||||
@ -1592,7 +1586,6 @@ bool CefRenderWidgetHostViewOSR::ResizeRootLayer() {
|
|||||||
void CefRenderWidgetHostViewOSR::ReleaseResizeHold() {
|
void CefRenderWidgetHostViewOSR::ReleaseResizeHold() {
|
||||||
DCHECK(hold_resize_);
|
DCHECK(hold_resize_);
|
||||||
hold_resize_ = false;
|
hold_resize_ = false;
|
||||||
cached_scale_factor_ = -1;
|
|
||||||
if (pending_resize_) {
|
if (pending_resize_) {
|
||||||
pending_resize_ = false;
|
pending_resize_ = false;
|
||||||
CEF_POST_TASK(CEF_UIT,
|
CEF_POST_TASK(CEF_UIT,
|
||||||
|
@ -375,8 +375,6 @@ class CefRenderWidgetHostViewOSR
|
|||||||
bool hold_resize_ = false;
|
bool hold_resize_ = false;
|
||||||
bool pending_resize_ = false;
|
bool pending_resize_ = false;
|
||||||
|
|
||||||
float cached_scale_factor_ = 0.0f;
|
|
||||||
|
|
||||||
// The associated Model. While |this| is being Destroyed,
|
// The associated Model. While |this| is being Destroyed,
|
||||||
// |render_widget_host_| is NULL and the message loop is run one last time
|
// |render_widget_host_| is NULL and the message loop is run one last time
|
||||||
// Message handlers must check for a NULL |render_widget_host_|.
|
// Message handlers must check for a NULL |render_widget_host_|.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user