From e68b30432e7ce124d6b52f4e9d4781abe4b9db40 Mon Sep 17 00:00:00 2001 From: Pyry Haulos Date: Wed, 4 Jan 2017 13:46:48 -0800 Subject: [PATCH] Reset Android window state when it is released This avoids leaking window state between tests in WSI tests. Affects: dEQP-VK.wsi.android.* Change-Id: I618485fbbc1bb83c86437bb04fbcbfa65b4c04c2 --- framework/platform/android/tcuAndroidWindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/framework/platform/android/tcuAndroidWindow.cpp b/framework/platform/android/tcuAndroidWindow.cpp index 619df0e..6444096 100644 --- a/framework/platform/android/tcuAndroidWindow.cpp +++ b/framework/platform/android/tcuAndroidWindow.cpp @@ -72,7 +72,12 @@ void Window::release (void) de::ScopedLock lock(m_stateLock); if (m_state == STATE_IN_USE) + { + // Reset buffer size and format back to initial state + ANativeWindow_setBuffersGeometry(m_window, 0, 0, 0); + m_state = STATE_AVAILABLE; + } else if (m_state == STATE_PENDING_DESTROY) m_state = STATE_READY_FOR_DESTROY; else -- 2.7.4