Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: components/mus/gles2/gpu_state.cc

Issue 1827453002: Handful of changes to get mus to shutdown correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/mus/gles2/gpu_state.h ('k') | components/mus/mus_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/gles2/gpu_state.cc
diff --git a/components/mus/gles2/gpu_state.cc b/components/mus/gles2/gpu_state.cc
index cd3c842cb248d9da54fcfd0b3857de7a29e2010b..b78f198555dad766cde41354e7313b51f2ba04c0 100644
--- a/components/mus/gles2/gpu_state.cc
+++ b/components/mus/gles2/gpu_state.cc
@@ -25,6 +25,7 @@ GpuState::GpuState()
base::ThreadRestrictions::ScopedAllowWait allow_wait;
gpu_thread_.Start();
control_thread_.Start();
+ control_thread_task_runner_ = control_thread_.task_runner();
base::WaitableEvent event(true, false);
gpu_thread_.task_runner()->PostTask(
FROM_HERE, base::Bind(&GpuState::InitializeOnGpuThread,
@@ -36,6 +37,9 @@ GpuState::~GpuState() {}
void GpuState::StopThreads() {
control_thread_.Stop();
+ gpu_thread_.task_runner()->PostTask(
+ FROM_HERE,
+ base::Bind(&GpuState::DestroyGpuSpecificStateOnGpuThread, this));
gpu_thread_.Stop();
}
@@ -69,4 +73,8 @@ void GpuState::InitializeOnGpuThread(base::WaitableEvent* event) {
#endif
}
+void GpuState::DestroyGpuSpecificStateOnGpuThread() {
+ driver_manager_.reset();
+}
+
} // namespace mus
« no previous file with comments | « components/mus/gles2/gpu_state.h ('k') | components/mus/mus_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698