Commit 7d66db12 authored by alexst's avatar alexst Committed by Commit bot

Enable 2 pending frames in the scheduler on ARM devices.

In the past eglSwapBuffers used to return early, before the swap actually happened and descheduling in the driver. This resulted in the scheduler beginning the next frame early and hitting the page flip deadline in time more often.

Freon returns swap ack when page flip actually happened, but with the side effect of scheduling shifted forward, resulting in more missed vblanks and reduced performance.

This change restores original performance on freon.

BUG=465599

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

Cr-Commit-Position: refs/heads/master@{#324098}
parent 1826022c
...@@ -30,12 +30,14 @@ GpuSurfacelessBrowserCompositorOutputSurface:: ...@@ -30,12 +30,14 @@ GpuSurfacelessBrowserCompositorOutputSurface::
gpu_memory_buffer_manager_(gpu_memory_buffer_manager) { gpu_memory_buffer_manager_(gpu_memory_buffer_manager) {
capabilities_.uses_default_gl_framebuffer = false; capabilities_.uses_default_gl_framebuffer = false;
capabilities_.flipped_output_surface = true; capabilities_.flipped_output_surface = true;
// TODO(alexst): Can't enable this on ARM since it hangs the device // Set |max_frames_pending| to 2 for surfaceless, which aligns scheduling
// (crbug.com/470185). Alternatively remove this entirely once the compositor // more closely with the previous surfaced behavior.
// scheduling is optimized enough to work well with surfaceless. // With a surface, swap buffer ack used to return early, before actually
#if defined(ARCH_CPU_X86_FAMILY) // presenting the back buffer, enabling the browser compositor to run ahead.
// Surfaceless implementation acks at the time of actual buffer swap, which
// shifts the start of the new frame forward relative to the old
// implementation.
capabilities_.max_frames_pending = 2; capabilities_.max_frames_pending = 2;
#endif
gl_helper_.reset(new GLHelper(context_provider_->ContextGL(), gl_helper_.reset(new GLHelper(context_provider_->ContextGL(),
context_provider_->ContextSupport())); context_provider_->ContextSupport()));
......
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