Skip to content

Commit

Permalink
cmake: add ENABLE_EGL_ASYNC_BUFFER_SWAPPING option (#362)
Browse files Browse the repository at this point in the history
This change adds ENABLE_EGL_ASYNC_BUFFER_SWAPPING not to sync compositor redraw (vblank).

Related issue #220

Signed-off-by: Hidenori Matsubayashi <[email protected]>
  • Loading branch information
HidenoriMatsubayashi authored Aug 7, 2023
1 parent 83d9b6f commit e5646da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ option(USE_DIRTY_REGION_MANAGEMENT "Use Flutter dirty region management" ON)
option(USE_GLES3 "Use OpenGL ES3 (default is OpenGL ES2)" OFF)
option(ENABLE_EGL_ALPHA_COMPONENT_OF_COLOR_BUFFER "Enable alpha component of the EGL color buffer" ON)
option(ENABLE_VSYNC "Enable embedder vsync" ON)
option(ENABLE_EGL_ASYNC_BUFFER_SWAPPING "Do not sync to compositor redraw (eglSwapInterval 0)" OFF)
option(BUILD_ELINUX_SO "Build .so file of elinux embedder" OFF)
option(ENABLE_ELINUX_EMBEDDER_LOG "Enable logger of eLinux embedder" ON)
option(FLUTTER_RELEASE "Build Flutter Engine with release mode" OFF)
Expand Down
7 changes: 7 additions & 0 deletions cmake/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ if(ENABLE_VSYNC)
)
endif()

# Do not sync to compositor redraw (eglSwapInterval 0).
if(ENABLE_EGL_ASYNC_BUFFER_SWAPPING)
add_definitions(
-DENABLE_EGL_ASYNC_BUFFER_SWAPPING
)
endif()

# Enable alpha component of the egl color buffer.
if(ENABLE_EGL_ALPHA_COMPONENT_OF_COLOR_BUFFER)
add_definitions(
Expand Down

0 comments on commit e5646da

Please sign in to comment.