src/third_party/angle/src/tests/gl_tests/BlitFramebufferANGLETest.cpp
// blit from user-created FBO to system framebuffer, using region larger than buffer.
blit from user-created FBO to system framebuffer, using region larger than buffer.
blit from user - created FBO to system framebuffer using region larger than buffer .
TEST_P(BlitFramebufferANGLETest, OversizedBlit)
{
    ANGLE_SKIP_TEST_IF(!IsGLExtensionEnabled("GL_ANGLE_framebuffer_blit"));
    glBindFramebuffer(GL_FRAMEBUFFER, mUserFBO);
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
    drawQuad(mCheckerProgram, essl1_shaders::PositionAttrib(), 0.8f);
    EXPECT_GL_NO_ERROR();
    glBindFramebuffer(GL_DRAW_FRAMEBUFFER_ANGLE, mOriginalFBO);
    glBindFramebuffer(GL_READ_FRAMEBUFFER_ANGLE, mUserFBO);
    glClearColor(1.0, 1.0, 1.0, 1.0);
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
    glBlitFramebufferANGLE(0, 0, getWindowWidth() * 2, getWindowHeight() * 2, 0, 0,
                           getWindowWidth() * 2, getWindowHeight() * 2, GL_COLOR_BUFFER_BIT,
                           GL_NEAREST);
    EXPECT_GL_NO_ERROR();
    glBindFramebuffer(GL_FRAMEBUFFER, mOriginalFBO);
    EXPECT_PIXEL_COLOR_EQ(getWindowWidth() / 4, getWindowHeight() / 4, GLColor::red);
    EXPECT_PIXEL_COLOR_EQ(getWindowWidth() / 4, 3 * getWindowHeight() / 4, GLColor::green);
    EXPECT_PIXEL_COLOR_EQ(3 * getWindowWidth() / 4, getWindowHeight() / 4, GLColor::blue);
    EXPECT_PIXEL_COLOR_EQ(3 * getWindowWidth() / 4, 3 * getWindowHeight() / 4, GLColor::yellow);
}
TEST_P ( BlitFramebufferANGLETest , OversizedBlit ) { ANGLE_SKIP_TEST_IF ( ! IsGLExtensionEnabled ( " " ) ) ; glBindFramebuffer ( GL_FRAMEBUFFER , mUserFBO ) ; glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT ) ; drawQuad ( mCheckerProgram , essl1_shaders :: PositionAttrib ( ) , 0.8f ) ; EXPECT_GL_NO_ERROR ( ) ; glBindFramebuffer ( GL_DRAW_FRAMEBUFFER_ANGLE , mOriginalFBO ) ; glBindFramebuffer ( GL_READ_FRAMEBUFFER_ANGLE , mUserFBO ) ; glClearColor ( 1.0 , 1.0 , 1.0 , 1.0 ) ; glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT ) ; glBlitFramebufferANGLE ( 0 , 0 , getWindowWidth ( ) * 2 , getWindowHeight ( ) * 2 , 0 , 0 , getWindowWidth ( ) * 2 , getWindowHeight ( ) * 2 , GL_COLOR_BUFFER_BIT , GL_NEAREST ) ; EXPECT_GL_NO_ERROR ( ) ; glBindFramebuffer ( GL_FRAMEBUFFER , mOriginalFBO ) ; EXPECT_PIXEL_COLOR_EQ ( getWindowWidth ( ) / 4 , getWindowHeight ( ) / 4 , GLColor :: red ) ; EXPECT_PIXEL_COLOR_EQ ( getWindowWidth ( ) / 4 , 3 * getWindowHeight ( ) / 4 , GLColor :: green ) ; EXPECT_PIXEL_COLOR_EQ ( 3 * getWindowWidth ( ) / 4 , getWindowHeight ( ) / 4 , GLColor :: blue ) ; EXPECT_PIXEL_COLOR_EQ ( 3 * getWindowWidth ( ) / 4 , 3 * getWindowHeight ( ) / 4 , GLColor :: yellow ) ; }
blit from user-created FBO to system framebuffer, using region larger than buffer.
blit from user - created FBO to system framebuffer using region larger than buffer .