Bump display_wl buffer count to 3

may help with backpressure in high fps situations

It was found that display.flip() can take a long time, at least if
framebuffer_region() is called, which causes dropped frames. The idea is
that if the server is still using the frame we may have to wait $omeTime
to get it back for drawing the next one, and the wait can be long
compared to the time to copy.

BUG=b/153580313

Change-Id: I00c50479b40383d2329d7eb714248a7154a22aba
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2224017
Commit-Queue: Lingfeng Yang <lfy@google.com>
Tested-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Jason Macnak <natsu@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
This commit is contained in:
Lingfeng Yang 2020-05-29 13:55:33 -07:00 committed by Commit Bot
parent 9e0a85e664
commit 29cd3fb4bb

View file

@ -24,7 +24,7 @@ use std::ptr::{null, null_mut};
use data_model::VolatileMemory;
use sys_util::{round_up_to_page_size, MemoryMapping, SharedMemory};
const BUFFER_COUNT: usize = 2;
const BUFFER_COUNT: usize = 3;
const BYTES_PER_PIXEL: u32 = 4;
struct DwlContext(*mut dwl_context);