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

Unified Diff: services/ui/public/cpp/gpu_service.h

Issue 2257713002: services/ui: GpuService should only be used from a single thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gpu-service-cleanup
Patch Set: tot merge Created 4 years, 4 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 | services/ui/public/cpp/gpu_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/public/cpp/gpu_service.h
diff --git a/services/ui/public/cpp/gpu_service.h b/services/ui/public/cpp/gpu_service.h
index bd6fa7082c886ebdb3bf545e0043903d45975190..f50b23920f6b3eebfa8bd93930b96a6bf7a63d82 100644
--- a/services/ui/public/cpp/gpu_service.h
+++ b/services/ui/public/cpp/gpu_service.h
@@ -53,14 +53,11 @@ class GpuService : public gpu::GpuChannelHostFactory,
GpuService(shell::Connector* connector,
scoped_refptr<base::SingleThreadTaskRunner> task_runner);
- scoped_refptr<gpu::GpuChannelHost> GetGpuChannelLocked();
- void EstablishGpuChannelOnMainThread();
+ scoped_refptr<gpu::GpuChannelHost> GetGpuChannel();
void EstablishGpuChannelOnMainThreadSyncLocked();
- void EstablishGpuChannelOnMainThreadDone(
- bool locked,
- int client_id,
- mojo::ScopedMessagePipeHandle channel_handle,
- const gpu::GPUInfo& gpu_info);
+ void OnEstablishedGpuChannel(int client_id,
+ mojo::ScopedMessagePipeHandle channel_handle,
+ const gpu::GPUInfo& gpu_info);
// gpu::GpuChannelHostFactory overrides:
bool IsMainThread() override;
@@ -75,13 +72,9 @@ class GpuService : public gpu::GpuChannelHostFactory,
std::unique_ptr<base::Thread> io_thread_;
std::unique_ptr<MojoGpuMemoryBufferManager> gpu_memory_buffer_manager_;
- // Lock for |gpu_channel_|, |establish_callbacks_| & |is_establishing_|.
- base::Lock lock_;
- bool is_establishing_;
ui::mojom::GpuServicePtr gpu_service_;
scoped_refptr<gpu::GpuChannelHost> gpu_channel_;
std::vector<gpu::GpuChannelEstablishedCallback> establish_callbacks_;
- base::ConditionVariable establishing_condition_;
DISALLOW_COPY_AND_ASSIGN(GpuService);
};
« no previous file with comments | « no previous file | services/ui/public/cpp/gpu_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698