Skip to content

Commit

Permalink
Detach the newly created EGL context from the main thread in the embe…
Browse files Browse the repository at this point in the history
…dder unit tests (flutter#24908)

The EGL context will be used by other threads during test execution, and it
should not be active on multiple threads at the same time.  This was not
noticed previously because SwiftShader was not checking for this, but other
EGL implementations may enforce this constraint.
  • Loading branch information
jason-simmons authored Mar 10, 2021
1 parent a560c26 commit a29ab4b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions shell/platform/embedder/tests/embedder_test_context_gl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ void EmbedderTestContextGL::SetupCompositor() {
<< "Set up the GL surface before setting up a compositor.";
compositor_ = std::make_unique<EmbedderTestCompositorGL>(
gl_surface_->GetSurfaceSize(), gl_surface_->GetGrContext());
GLClearCurrent();
}

} // namespace testing
Expand Down

0 comments on commit a29ab4b

Please sign in to comment.