diff options
author | YiMing Tseng <yimingtseng@google.com> | 2021-11-11 14:05:30 +0800 |
---|---|---|
committer | Yi-ming Tseng <yimingtseng@google.com> | 2021-12-09 09:09:25 +0000 |
commit | 0b5ab223e110f3a34b30e7b61e4ea68c03dba98b (patch) | |
tree | c87c7bb1c44219e1cdf45506113ef451ce15d998 /modules/gralloc/framebuffer.cpp | |
parent | dbf2545214d16eaed5901bd41c8c8e8871ef0168 (diff) |
Add GRALLOC_FRAMEBUFFER_NUM configuration
Add config to set the NUM_BUFFERS. Set NUM_BUFFERS to 1 can
prevent page flipping and set it to a larger number can allow
userspace to fill up the following frame earlier.
Bug: 205917753
Change-Id: Ibf4a52a1e35f4a2404008a48b637cb82c4b46365
Diffstat (limited to 'modules/gralloc/framebuffer.cpp')
-rw-r--r-- | modules/gralloc/framebuffer.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/gralloc/framebuffer.cpp b/modules/gralloc/framebuffer.cpp index b2ec3e44..fc220dbc 100644 --- a/modules/gralloc/framebuffer.cpp +++ b/modules/gralloc/framebuffer.cpp @@ -45,8 +45,10 @@ #define USE_PAN_DISPLAY 0 #endif -// numbers of buffers for page flipping +// Enabling page flipping by default +#ifndef NUM_BUFFERS #define NUM_BUFFERS 2 +#endif enum { @@ -157,7 +159,8 @@ int mapFrameBufferLocked(struct private_module_t* module, int format) info.activate = FB_ACTIVATE_NOW; /* - * Request NUM_BUFFERS screens (at lest 2 for page flipping) + * Request NUM_BUFFERS screens + * To enable page flipping, NUM_BUFFERS should be at least 2. */ info.yres_virtual = info.yres * NUM_BUFFERS; |