mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	CefBrowserHost::Invalidate should call OnPaint unconditionally (issue #1871)
This commit is contained in:
		@@ -1134,13 +1134,7 @@ void CefRenderWidgetHostViewOSR::Invalidate(
 | 
			
		||||
  const gfx::Rect& bounds_in_pixels = gfx::Rect(GetPhysicalBackingSize());
 | 
			
		||||
 | 
			
		||||
  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()) {
 | 
			
		||||
    copy_frame_generator_->GenerateCopyFrame(true, bounds_in_pixels);
 | 
			
		||||
  }
 | 
			
		||||
@@ -1376,18 +1370,6 @@ void CefRenderWidgetHostViewOSR::ResizeRootLayer() {
 | 
			
		||||
  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() {
 | 
			
		||||
  const base::TimeTicks frame_time = base::TimeTicks::Now();
 | 
			
		||||
  const base::TimeDelta vsync_period =
 | 
			
		||||
 
 | 
			
		||||
@@ -282,9 +282,6 @@ class CefRenderWidgetHostViewOSR
 | 
			
		||||
  void SetDeviceScaleFactor();
 | 
			
		||||
  void ResizeRootLayer();
 | 
			
		||||
 | 
			
		||||
  // Returns a best guess whether a frame is currently pending.
 | 
			
		||||
  bool IsFramePending();
 | 
			
		||||
 | 
			
		||||
  // Called by CefBeginFrameTimer to send a BeginFrame request.
 | 
			
		||||
  void OnBeginFrameTimerTick();
 | 
			
		||||
  void SendBeginFrame(base::TimeTicks frame_time,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user