Add a workaround for simulate secondary display
To workaround a deadlock caused by bufferqueue locks
we force RenderThread over to use async mode which
we enable via eglSwapInterval(0)
Bug: 38372997
Test: steps in the bug
Change-Id: Ia305f73abbdd64ab0c25d1f7d32792cc6295a0ce
diff --git a/libs/hwui/Properties.h b/libs/hwui/Properties.h
index 9db6449..91b4a2d 100644
--- a/libs/hwui/Properties.h
+++ b/libs/hwui/Properties.h
@@ -318,6 +318,12 @@
// any overhead they add
static bool filterOutTestOverhead;
+ // Workaround a device lockup in edge cases by switching to async mode
+ // instead of the default vsync (b/38372997). Only system_server should hit this.
+ // Any existing RenderProxy & Surface combination will be unaffected, only things
+ // created after changing this.
+ static bool disableVsync;
+
// Used for testing only to change the render pipeline.
#ifdef HWUI_GLES_WRAP_ENABLED
static void overrideRenderPipelineType(RenderPipelineType);