From 8ded9613c5f47cd398731ee4ae78c0f0ea5411d6 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Tue, 30 May 2023 19:10:15 -0700 Subject: [PATCH] Wait for GL command completion in the ExternalTextureGLRefreshedTooOften test This test sometimes caused assertion failures when running on Windows with ANGLE. The process may be unable to safely clean up global objects if GL commands are pending when the test exits. --- shell/platform/embedder/tests/embedder_gl_unittests.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shell/platform/embedder/tests/embedder_gl_unittests.cc b/shell/platform/embedder/tests/embedder_gl_unittests.cc index 65d698d01448b..41ed0381c1696 100644 --- a/shell/platform/embedder/tests/embedder_gl_unittests.cc +++ b/shell/platform/embedder/tests/embedder_gl_unittests.cc @@ -4019,10 +4019,14 @@ TEST_F(EmbedderTest, ExternalTextureGLRefreshedTooOften) { auto context = surface.GetGrContext(); typedef void (*glGenTexturesProc)(uint32_t n, uint32_t* textures); + typedef void (*glFinishProc)(); + glGenTexturesProc glGenTextures; + glFinishProc glFinish; glGenTextures = reinterpret_cast( surface.GetProcAddress("glGenTextures")); + glFinish = reinterpret_cast(surface.GetProcAddress("glFinish")); uint32_t name; glGenTextures(1, &name); @@ -4067,6 +4071,8 @@ TEST_F(EmbedderTest, ExternalTextureGLRefreshedTooOften) { DlImageSampling::kLinear); EXPECT_TRUE(resolve_called); + + glFinish(); } TEST_F(EmbedderTest,