src/third_party/angle/src/tests/egl_tests/EGLSurfaceTest.cpp
// Test creating a surface that supports a EGLConfig with 16bit
// support GL_RGB5_A1
Test creating a surface that supports a EGLConfig with 16bit
support GL_RGB5_A1
Test creating a surface that supports a EGLConfig with 16bit support GL_RGB5_A1
TEST_P(EGLSurfaceTest, CreateWithEGLConfig5551Support)
{
    const EGLint configAttributes[] = {EGL_SURFACE_TYPE,
                                       EGL_WINDOW_BIT,
                                       EGL_RED_SIZE,
                                       5,
                                       EGL_GREEN_SIZE,
                                       5,
                                       EGL_BLUE_SIZE,
                                       5,
                                       EGL_ALPHA_SIZE,
                                       1,
                                       EGL_DEPTH_SIZE,
                                       0,
                                       EGL_STENCIL_SIZE,
                                       0,
                                       EGL_SAMPLE_BUFFERS,
                                       0,
                                       EGL_NONE};
    initializeDisplay();
    EGLConfig config;
    if (EGLWindow::FindEGLConfig(mDisplay, configAttributes, &config) == EGL_FALSE)
    {
        std::cout << "EGLConfig for a GL_RGB5_A1 surface is not supported, skipping test"
                  << std::endl;
        return;
    }
    initializeSurface(config);
    eglMakeCurrent(mDisplay, mWindowSurface, mWindowSurface, mContext);
    ASSERT_EGL_SUCCESS();
    GLuint program = createProgram();
    ASSERT_NE(0u, program);
    drawWithProgram(program);
    EXPECT_GL_NO_ERROR();
    glDeleteProgram(program);
}
TEST_P ( EGLSurfaceTest , CreateWithEGLConfig5551Support ) { const EGLint configAttributes [ ] = { EGL_SURFACE_TYPE , EGL_WINDOW_BIT , EGL_RED_SIZE , 5 , EGL_GREEN_SIZE , 5 , EGL_BLUE_SIZE , 5 , EGL_ALPHA_SIZE , 1 , EGL_DEPTH_SIZE , 0 , EGL_STENCIL_SIZE , 0 , EGL_SAMPLE_BUFFERS , 0 , EGL_NONE } ; initializeDisplay ( ) ; EGLConfig config ; if ( EGLWindow :: FindEGLConfig ( mDisplay , configAttributes , & config ) == EGL_FALSE ) { std :: cout << " " << std :: endl ; return ; } initializeSurface ( config ) ; eglMakeCurrent ( mDisplay , mWindowSurface , mWindowSurface , mContext ) ; ASSERT_EGL_SUCCESS ( ) ; GLuint program = createProgram ( ) ; ASSERT_NE ( 0u , program ) ; drawWithProgram ( program ) ; EXPECT_GL_NO_ERROR ( ) ; glDeleteProgram ( program ) ; }
Test creating a surface that supports a EGLConfig with 16bit
support GL_RGB5_A1
Test creating a surface that supports a EGLConfig with 16bit support GL_RGB5_A1