// // Copyright 2015 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. // #include "test_utils/ANGLETest.h" #include "test_utils/gl_raii.h" #include "util/EGLWindow.h" usingnamespaceangle; class PbufferTest : public ANGLETest<> { … }; class PbufferColorspaceTest : public PbufferTest { … }; // Test clearing a Pbuffer and checking the color is correct TEST_P(PbufferTest, Clearing) { … } // Bind the Pbuffer to a texture and verify it renders correctly TEST_P(PbufferTest, BindTexImage) { … } // Test various EGL level cases for eglBindTexImage. TEST_P(PbufferTest, BindTexImageAlreadyBound) { … } // Test that eglBindTexImage overwriting previous bind works. TEST_P(PbufferTest, BindTexImageOverwrite) { … } // Test that eglBindTexImage overwriting previous bind works and does not crash on releaseTexImage. TEST_P(PbufferTest, BindTexImageOverwriteNoCrashOnReleaseTexImage) { … } // Test that eglBindTexImage pbuffer is unbound when the texture is destroyed. TEST_P(PbufferTest, BindTexImageReleaseViaTextureDestroy) { … } // Test that eglBindTexImage pbuffer is unbound when eglReleaseTexImage is called. TEST_P(PbufferTest, BindTexImagePbufferReleaseWhileBoundToFBOColorBuffer) { … } // Test that eglBindTexImage pbuffer is bound when the pbuffer is destroyed. TEST_P(PbufferTest, BindTexImagePbufferDestroyWhileBound) { … } // Test that eglBindTexImage overwrite releases the previous pbuffer if the previous is orphaned. TEST_P(PbufferTest, BindTexImageOverwriteReleasesOrphanedPbuffer) { … } // Verify that binding a pbuffer works after using a texture normally. TEST_P(PbufferTest, BindTexImageAfterTexImage) { … } // Test clearing a Pbuffer in sRGB colorspace and checking the color is correct. // Then bind the Pbuffer to a texture and verify it renders correctly TEST_P(PbufferTest, ClearAndBindTexImageSrgb) { … } // Test clearing a Pbuffer in sRGB colorspace and checking the color is correct. // Then bind the Pbuffer to a texture and verify it renders correctly. // Then change texture state to skip decode and verify it renders correctly. TEST_P(PbufferTest, ClearAndBindTexImageSrgbSkipDecode) { … } // Verify that when eglBind/ReleaseTexImage are called, the texture images are freed and their // size information is correctly updated. TEST_P(PbufferTest, TextureSizeReset) { … } // Bind a Pbuffer, redefine the texture, and verify it renders correctly TEST_P(PbufferTest, BindTexImageAndRedefineTexture) { … } // Bind the Pbuffer to a texture, use that texture as Framebuffer color attachment and then // destroy framebuffer, texture and Pbuffer. TEST_P(PbufferTest, UseAsFramebufferColorThenDestroy) { … } // Bind the Pbuffer to a texture, use that texture as Framebuffer color attachment and then // destroy framebuffer, texture and Pbuffer. A bound but released TexImages are destroyed // only when the binding is overwritten. TEST_P(PbufferTest, UseAsFramebufferColorThenDeferredDestroy) { … } // Test that passing colorspace attributes do not generate EGL validation errors // when EGL_ANGLE_colorspace_attribute_passthrough extension is supported. TEST_P(PbufferColorspaceTest, CreateSurfaceWithColorspace) { … } ANGLE_INSTANTIATE_TEST_ES2(…); GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(…); ANGLE_INSTANTIATE_TEST_ES3_AND(…);