// // Copyright 2021 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. // // EGLLockSurface3Test.cpp: // EGL extension EGL_KHR_lock_surface // #include <gtest/gtest.h> #include <chrono> #include <iostream> #include <thread> #include "test_utils/ANGLETest.h" #include "test_utils/gl_raii.h" #include "util/EGLWindow.h" #include "util/OSWindow.h" usingnamespacestd::chrono_literals; usingnamespaceangle; GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(…); class EGLLockSurface3Test : public ANGLETest<> { … }; // Create parity between eglQuerySurface and eglQuerySurface64KHR TEST_P(EGLLockSurface3Test, QuerySurfaceAndQuerySurface64Parity) { … } // Create PBufferSurface, Lock, check all the attributes, unlock. TEST_P(EGLLockSurface3Test, AttributeTest) { … } // Create PBufferSurface, glClear Green, Draw red quad, Lock, check buffer for red, // Write white pixels, Unlock, Test pixels for white TEST_P(EGLLockSurface3Test, PbufferSurfaceReadWriteTest) { … } // Create PBufferSurface, glClear Green, Lock, check buffer for green, Write white pixels, // Unlock, Test pixels for white. // This expects that a glClear() alone is sufficient to pre-color the Surface TEST_P(EGLLockSurface3Test, PbufferSurfaceReadWriteDeferredCleaarTest) { … } // Create WindowSurface, Clear Color to GREEN, draw red quad, Lock with PRESERVE_PIXELS, // read/check pixels, Unlock. TEST_P(EGLLockSurface3Test, WindowSurfaceReadTest) { … } // Test default msaa surface resolve path. TEST_P(EGLLockSurface3Test, WindowMsaaSurfaceReadTest) { … } // Create WindowSurface, Lock surface, Write pixels red, Unlock, check pixels, // then swapbuffers to visually check. TEST_P(EGLLockSurface3Test, WindowSurfaceWritePreserveTest) { … } ANGLE_INSTANTIATE_TEST(…);