Use SetNeedsBeginFrames from IPC handler
This commit is contained in:
parent
d71f10c5a3
commit
f0ceb4f065
2 changed files with 10 additions and 15 deletions
|
@ -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(
|
||||
|
|
|
@ -175,7 +175,6 @@ class OffScreenRenderWidgetHostView
|
|||
|
||||
bool InstallTransparency();
|
||||
bool IsAutoResizeEnabled() const;
|
||||
void OnSetNeedsBeginFrames(bool enabled);
|
||||
|
||||
// NativeWindowObserver:
|
||||
void OnWindowResize() override;
|
||||
|
|
Loading…
Reference in a new issue