libgui: Fix segfault in SRGB tests
Make the test exit cleanly if the output buffer is never mapped. Bug: 12761226 Change-Id: If789f02198851a17b11ee06f612f9ba7e06da754
This commit is contained in:
parent
ef11a6c887
commit
b8072d84ba
@ -82,6 +82,7 @@ protected:
|
|||||||
|
|
||||||
virtual void TearDown() {
|
virtual void TearDown() {
|
||||||
ASSERT_NO_FATAL_FAILURE(copyToDebugSurface());
|
ASSERT_NO_FATAL_FAILURE(copyToDebugSurface());
|
||||||
|
ASSERT_TRUE(mLockedBuffer.data != NULL);
|
||||||
ASSERT_EQ(NO_ERROR, mCpuConsumer->unlockBuffer(mLockedBuffer));
|
ASSERT_EQ(NO_ERROR, mCpuConsumer->unlockBuffer(mLockedBuffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,6 +259,7 @@ private:
|
|||||||
EXPECT_TRUE(eglChooseConfig(mEglDisplay, configAttribs, &mEglConfig, 1,
|
EXPECT_TRUE(eglChooseConfig(mEglDisplay, configAttribs, &mEglConfig, 1,
|
||||||
&numConfigs));
|
&numConfigs));
|
||||||
ASSERT_EQ(EGL_SUCCESS, eglGetError());
|
ASSERT_EQ(EGL_SUCCESS, eglGetError());
|
||||||
|
ASSERT_GT(numConfigs, 0);
|
||||||
|
|
||||||
static const EGLint contextAttribs[] = {
|
static const EGLint contextAttribs[] = {
|
||||||
EGL_CONTEXT_CLIENT_VERSION, 3,
|
EGL_CONTEXT_CLIENT_VERSION, 3,
|
||||||
|
Loading…
Reference in New Issue
Block a user