diff --git a/CMakeLists.txt b/CMakeLists.txt index 723556b..4e7f069 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/cmake/build.cmake b/cmake/build.cmake index cde9cc9..56eda14 100644 --- a/cmake/build.cmake +++ b/cmake/build.cmake @@ -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(