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

Unified Diff: content/gpu/gpu_child_thread.cc

Issue 2801943002: gpu: Some code cleanups. (Closed)
Patch Set: . Created 3 years, 8 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 | « content/browser/gpu/gpu_process_host.cc ('k') | services/ui/gpu/gpu_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_child_thread.cc
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
index af96469235edbb36ee3171f58fd0260ea8e0cd0c..f2ad57e72cf35fc1b8d1729bf3e3297ad92fae2f 100644
--- a/content/gpu/gpu_child_thread.cc
+++ b/content/gpu/gpu_child_thread.cc
@@ -165,7 +165,6 @@ void GpuChildThread::CreateGpuService(
ui::mojom::GpuHostPtr gpu_host,
const gpu::GpuPreferences& gpu_preferences,
mojo::ScopedSharedBufferHandle activity_flags) {
- gpu_service_->Bind(std::move(request));
gpu_service_->UpdateGPUInfoFromPreferences(gpu_preferences);
for (const LogMessage& log : deferred_messages_)
gpu_host->RecordLogMessage(log.severity, log.header, log.message);
@@ -179,6 +178,10 @@ void GpuChildThread::CreateGpuService(
return;
}
+ // Bind should happen only if initialization succeeds (i.e. not dead on
+ // arrival), because otherwise, it can receive requests from the host while in
+ // an uninitialized state.
+ gpu_service_->Bind(std::move(request));
gpu::SyncPointManager* sync_point_manager = nullptr;
// Note SyncPointManager from ContentGpuClient cannot be owned by this.
if (GetContentClient()->gpu())
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | services/ui/gpu/gpu_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698