mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-21 14:40:49 +01:00
CefBrowserHost::Invalidate should call OnPaint unconditionally (issue #1871)
This commit is contained in:
parent
60b3718650
commit
9d8b8dd8c6
@ -1134,13 +1134,7 @@ void CefRenderWidgetHostViewOSR::Invalidate(
|
|||||||
const gfx::Rect& bounds_in_pixels = gfx::Rect(GetPhysicalBackingSize());
|
const gfx::Rect& bounds_in_pixels = gfx::Rect(GetPhysicalBackingSize());
|
||||||
|
|
||||||
if (software_output_device_) {
|
if (software_output_device_) {
|
||||||
if (IsFramePending()) {
|
|
||||||
// Include the invalidated region in the next frame generated.
|
|
||||||
software_output_device_->Invalidate(bounds_in_pixels);
|
|
||||||
} else {
|
|
||||||
// Call OnPaint immediately.
|
|
||||||
software_output_device_->OnPaint(bounds_in_pixels);
|
software_output_device_->OnPaint(bounds_in_pixels);
|
||||||
}
|
|
||||||
} else if (copy_frame_generator_.get()) {
|
} else if (copy_frame_generator_.get()) {
|
||||||
copy_frame_generator_->GenerateCopyFrame(true, bounds_in_pixels);
|
copy_frame_generator_->GenerateCopyFrame(true, bounds_in_pixels);
|
||||||
}
|
}
|
||||||
@ -1376,18 +1370,6 @@ void CefRenderWidgetHostViewOSR::ResizeRootLayer() {
|
|||||||
compositor_->SetScaleAndSize(scale_factor_, size_in_pixels);
|
compositor_->SetScaleAndSize(scale_factor_, size_in_pixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CefRenderWidgetHostViewOSR::IsFramePending() {
|
|
||||||
if (!IsShowing())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (begin_frame_timer_.get())
|
|
||||||
return begin_frame_timer_->IsActive();
|
|
||||||
else if (copy_frame_generator_.get())
|
|
||||||
return copy_frame_generator_->frame_pending();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::OnBeginFrameTimerTick() {
|
void CefRenderWidgetHostViewOSR::OnBeginFrameTimerTick() {
|
||||||
const base::TimeTicks frame_time = base::TimeTicks::Now();
|
const base::TimeTicks frame_time = base::TimeTicks::Now();
|
||||||
const base::TimeDelta vsync_period =
|
const base::TimeDelta vsync_period =
|
||||||
|
@ -282,9 +282,6 @@ class CefRenderWidgetHostViewOSR
|
|||||||
void SetDeviceScaleFactor();
|
void SetDeviceScaleFactor();
|
||||||
void ResizeRootLayer();
|
void ResizeRootLayer();
|
||||||
|
|
||||||
// Returns a best guess whether a frame is currently pending.
|
|
||||||
bool IsFramePending();
|
|
||||||
|
|
||||||
// Called by CefBeginFrameTimer to send a BeginFrame request.
|
// Called by CefBeginFrameTimer to send a BeginFrame request.
|
||||||
void OnBeginFrameTimerTick();
|
void OnBeginFrameTimerTick();
|
||||||
void SendBeginFrame(base::TimeTicks frame_time,
|
void SendBeginFrame(base::TimeTicks frame_time,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user