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

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

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 | « no previous file | components/mus/gles2/gpu_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/gles2/gpu_state.h
diff --git a/components/mus/gles2/gpu_state.h b/components/mus/gles2/gpu_state.h
index dca04b680a963b9c3a9e48e0c8b1ae1ed0cabfc0..aec23e4f11d399f28143bd3c8642166e7ffa75c9 100644
--- a/components/mus/gles2/gpu_state.h
+++ b/components/mus/gles2/gpu_state.h
@@ -33,7 +33,7 @@ class GpuState : public base::RefCountedThreadSafe<GpuState> {
// most method class to the CommandBufferDriver, which runs on the "driver",
// thread (i.e., the thread on which GpuImpl instances are created).
scoped_refptr<base::SingleThreadTaskRunner> control_task_runner() {
- return control_thread_.task_runner();
+ return control_thread_task_runner_;
}
void StopThreads();
@@ -74,11 +74,17 @@ class GpuState : public base::RefCountedThreadSafe<GpuState> {
void InitializeOnGpuThread(base::WaitableEvent* event);
+ void DestroyGpuSpecificStateOnGpuThread();
+
// |gpu_thread_| is for executing OS GL calls.
base::Thread gpu_thread_;
// |control_thread_| is for mojo incoming calls of CommandBufferImpl.
base::Thread control_thread_;
+ // Same as control_thread_->task_runner(). The TaskRunner is cached as it may
+ // be needed during shutdown.
+ scoped_refptr<base::SingleThreadTaskRunner> control_thread_task_runner_;
+
gpu::GpuPreferences gpu_preferences_;
scoped_refptr<CommandBufferTaskRunner> command_buffer_task_runner_;
scoped_ptr<CommandBufferDriverManager> driver_manager_;
« no previous file with comments | « no previous file | components/mus/gles2/gpu_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698