| 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
|
|
|