Commit 346f30ca authored by alexst's avatar alexst Committed by Commit bot

This adds missing plumbing to single_thread_proxy to forward max pending...

This adds missing plumbing to single_thread_proxy to forward max pending frames from the surface to the compositor, but keeps max pending value the same for the time being. Currently the call to SetMaxSwapsPendingOnImplThread in layer_tree_host_impl.cc gets dropped on the floor for ChromeOS.

Previously, driver implementation of eglSwapBuffers returned before page flip actually happened, allowing the browser compositor to start scheduling the next frame while the front buffer was still shown.

With switch to freon, SwapBuffersACK is sent on page flip, affecting scheduler timing. This enables the browser compositor to queue up a new frame earlier when necessary.

BUG=465599

Review URL: https://codereview.chromium.org/1011823005

Cr-Commit-Position: refs/heads/master@{#322148}
parent 6d2feff0
...@@ -540,6 +540,11 @@ void SingleThreadProxy::SetEstimatedParentDrawTime(base::TimeDelta draw_time) { ...@@ -540,6 +540,11 @@ void SingleThreadProxy::SetEstimatedParentDrawTime(base::TimeDelta draw_time) {
scheduler_on_impl_thread_->SetEstimatedParentDrawTime(draw_time); scheduler_on_impl_thread_->SetEstimatedParentDrawTime(draw_time);
} }
void SingleThreadProxy::SetMaxSwapsPendingOnImplThread(int max) {
if (scheduler_on_impl_thread_)
scheduler_on_impl_thread_->SetMaxSwapsPending(max);
}
void SingleThreadProxy::DidSwapBuffersOnImplThread() { void SingleThreadProxy::DidSwapBuffersOnImplThread() {
TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersOnImplThread"); TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersOnImplThread");
if (scheduler_on_impl_thread_) if (scheduler_on_impl_thread_)
......
...@@ -88,7 +88,7 @@ class CC_EXPORT SingleThreadProxy : public Proxy, ...@@ -88,7 +88,7 @@ class CC_EXPORT SingleThreadProxy : public Proxy,
void CommitVSyncParameters(base::TimeTicks timebase, void CommitVSyncParameters(base::TimeTicks timebase,
base::TimeDelta interval) override; base::TimeDelta interval) override;
void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override; void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override;
void SetMaxSwapsPendingOnImplThread(int max) override {} void SetMaxSwapsPendingOnImplThread(int max) override;
void DidSwapBuffersOnImplThread() override; void DidSwapBuffersOnImplThread() override;
void DidSwapBuffersCompleteOnImplThread() override; void DidSwapBuffersCompleteOnImplThread() override;
void OnCanDrawStateChanged(bool can_draw) override; void OnCanDrawStateChanged(bool can_draw) override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment