CefBrowserHost::Invalidate should call OnPaint unconditionally (issue #1871)
This commit is contained in:
parent
a60bb077a3
commit
8a5e7a1270
|
@ -1174,13 +1174,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);
|
||||||
}
|
}
|
||||||
|
@ -1431,18 +1425,6 @@ void CefRenderWidgetHostViewOSR::ResizeRootLayer() {
|
||||||
GetCompositor()->SetScaleAndSize(scale_factor_, size_in_pixels);
|
GetCompositor()->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 =
|
||||||
|
|
|
@ -276,9 +276,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…
Reference in New Issue