From 9adbf5c844916c644e875f9edde076c2bf5db684 Mon Sep 17 00:00:00 2001 From: Joel Winarske Date: Mon, 25 Sep 2023 17:55:32 -0700 Subject: [PATCH] Impeller opengles EGL_BAD_ACCESS -On Linux setting the EGL context from one thread, then setting from another thread will trigger a EGL_BAD_ACCESS error. The resolution is to clear the context after use on the thread that set it. -remote call to SetReactionsAllowedOnCurrentThread(), as it defaults to false. Signed-off-by: Joel Winarske --- shell/platform/embedder/embedder_surface_gl_impeller.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/embedder/embedder_surface_gl_impeller.cc b/shell/platform/embedder/embedder_surface_gl_impeller.cc index 20a2a5184e133..340725d2b9d3b 100644 --- a/shell/platform/embedder/embedder_surface_gl_impeller.cc +++ b/shell/platform/embedder/embedder_surface_gl_impeller.cc @@ -86,13 +86,13 @@ EmbedderSurfaceGLImpeller::EmbedderSurfaceGLImpeller( return; } - worker_->SetReactionsAllowedOnCurrentThread(true); auto worker_id = impeller_context_->AddReactorWorker(worker_); if (!worker_id.has_value()) { FML_LOG(ERROR) << "Could not add reactor worker."; return; } + gl_dispatch_table_.gl_clear_current_callback(); FML_LOG(ERROR) << "Using the Impeller rendering backend (OpenGL)."; valid_ = true; }