// // Copyright 2017 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // WebGLReadOutsideFramebufferTest.cpp : Test functions which read the framebuffer (readPixels, // copyTexSubImage2D, copyTexImage2D) on areas outside the framebuffer. #include "test_utils/ANGLETest.h" #include "test_utils/gl_raii.h" namespace { class PixelRect { … }; } // namespace namespace angle { class WebGLReadOutsideFramebufferTest : public ANGLETest<> { … }; class WebGL2ReadOutsideFramebufferTest : public WebGLReadOutsideFramebufferTest { … }; // Check that readPixels does not set a destination pixel when // the corresponding source pixel is outside the framebuffer. TEST_P(WebGLReadOutsideFramebufferTest, ReadPixels) { … } // Check that copyTexSubImage2D does not set a destination pixel when // the corresponding source pixel is outside the framebuffer. TEST_P(WebGLReadOutsideFramebufferTest, CopyTexSubImage2D) { … } // Check that copyTexImage2D sets (0,0,0,0) for pixels outside the framebuffer. TEST_P(WebGLReadOutsideFramebufferTest, CopyTexImage2D) { … } // Check that copyTexSubImage3D does not set a destination pixel when // the corresponding source pixel is outside the framebuffer. TEST_P(WebGL2ReadOutsideFramebufferTest, CopyTexSubImage3D) { … } ANGLE_INSTANTIATE_TEST_ES2_AND_ES3(…); ANGLE_INSTANTIATE_TEST_ES3(…); } // namespace angle