Skip to content

Commit e5646da

Browse files
cmake: add ENABLE_EGL_ASYNC_BUFFER_SWAPPING option (sony#362)
This change adds ENABLE_EGL_ASYNC_BUFFER_SWAPPING not to sync compositor redraw (vblank). Related issue sony#220 Signed-off-by: Hidenori Matsubayashi <[email protected]>
1 parent 83d9b6f commit e5646da

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ option(USE_DIRTY_REGION_MANAGEMENT "Use Flutter dirty region management" ON)
1515
option(USE_GLES3 "Use OpenGL ES3 (default is OpenGL ES2)" OFF)
1616
option(ENABLE_EGL_ALPHA_COMPONENT_OF_COLOR_BUFFER "Enable alpha component of the EGL color buffer" ON)
1717
option(ENABLE_VSYNC "Enable embedder vsync" ON)
18+
option(ENABLE_EGL_ASYNC_BUFFER_SWAPPING "Do not sync to compositor redraw (eglSwapInterval 0)" OFF)
1819
option(BUILD_ELINUX_SO "Build .so file of elinux embedder" OFF)
1920
option(ENABLE_ELINUX_EMBEDDER_LOG "Enable logger of eLinux embedder" ON)
2021
option(FLUTTER_RELEASE "Build Flutter Engine with release mode" OFF)

cmake/build.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ if(ENABLE_VSYNC)
118118
)
119119
endif()
120120

121+
# Do not sync to compositor redraw (eglSwapInterval 0).
122+
if(ENABLE_EGL_ASYNC_BUFFER_SWAPPING)
123+
add_definitions(
124+
-DENABLE_EGL_ASYNC_BUFFER_SWAPPING
125+
)
126+
endif()
127+
121128
# Enable alpha component of the egl color buffer.
122129
if(ENABLE_EGL_ALPHA_COMPONENT_OF_COLOR_BUFFER)
123130
add_definitions(

0 commit comments

Comments
 (0)