Use SetNeedsBeginFrames from IPC handler

This commit is contained in:
Kevin Sawicki 2016-12-20 09:03:42 -08:00 committed by Birunthan Mohanathas
parent d71f10c5a3
commit f0ceb4f065
2 changed files with 10 additions and 15 deletions

View file

@ -424,7 +424,7 @@ bool OffScreenRenderWidgetHostView::OnMessageReceived(
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(OffScreenRenderWidgetHostView, message)
IPC_MESSAGE_HANDLER(ViewHostMsg_SetNeedsBeginFrames,
OnSetNeedsBeginFrames)
SetNeedsBeginFrames)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@ -548,17 +548,6 @@ bool OffScreenRenderWidgetHostView::LockMouse() {
void OffScreenRenderWidgetHostView::UnlockMouse() {
}
void OffScreenRenderWidgetHostView::SetNeedsBeginFrames(
bool needs_begin_frames) {
SetupFrameRate(false);
begin_frame_timer_->SetActive(needs_begin_frames);
if (software_output_device_) {
software_output_device_->SetActive(needs_begin_frames && painting_);
}
}
void OffScreenRenderWidgetHostView::OnSwapCompositorFrame(
uint32_t output_surface_id,
cc::CompositorFrame frame) {
@ -801,8 +790,15 @@ bool OffScreenRenderWidgetHostView::IsAutoResizeEnabled() const {
return false;
}
void OffScreenRenderWidgetHostView::OnSetNeedsBeginFrames(bool enabled) {
SetNeedsBeginFrames(enabled);
void OffScreenRenderWidgetHostView::SetNeedsBeginFrames(
bool needs_begin_frames) {
SetupFrameRate(false);
begin_frame_timer_->SetActive(needs_begin_frames);
if (software_output_device_) {
software_output_device_->SetActive(needs_begin_frames && painting_);
}
}
void OffScreenRenderWidgetHostView::OnPaint(

View file

@ -175,7 +175,6 @@ class OffScreenRenderWidgetHostView
bool InstallTransparency();
bool IsAutoResizeEnabled() const;
void OnSetNeedsBeginFrames(bool enabled);
// NativeWindowObserver:
void OnWindowResize() override;