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

Unified Diff: services/ui/ws/gpu_service_proxy.cc

Issue 2379263002: services/ui: Fix setting client id for gpu channels. (Closed)
Patch Set: Created 4 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/gpu_service_proxy.cc
diff --git a/services/ui/ws/gpu_service_proxy.cc b/services/ui/ws/gpu_service_proxy.cc
index b0932e071bb2581c35669e9dca27d3af59150ee0..5488b87e5d732a21f5b8f4bd844dce27994c1599 100644
--- a/services/ui/ws/gpu_service_proxy.cc
+++ b/services/ui/ws/gpu_service_proxy.cc
@@ -25,7 +25,7 @@ const uint64_t kInternalGpuChannelClientTracingId = 1;
GpuServiceProxy::GpuServiceProxy(GpuServiceProxyDelegate* delegate)
: delegate_(delegate),
- next_client_id_(kInternalGpuChannelClientId),
+ next_client_id_(kInternalGpuChannelClientId + 1),
main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()),
shutdown_event_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
base::WaitableEvent::InitialState::NOT_SIGNALED) {
@@ -54,7 +54,6 @@ void GpuServiceProxy::OnInitialized(const gpu::GPUInfo& gpu_info) {
kInternalGpuChannelClientId, kInternalGpuChannelClientTracingId,
is_gpu_host, base::Bind(&GpuServiceProxy::OnInternalGpuChannelEstablished,
base::Unretained(this)));
- next_client_id_ = kInternalGpuChannelClientId + 1;
}
void GpuServiceProxy::OnInternalGpuChannelEstablished(
@@ -83,7 +82,7 @@ void GpuServiceProxy::OnGpuChannelEstablished(
void GpuServiceProxy::EstablishGpuChannel(
const EstablishGpuChannelCallback& callback) {
- const int client_id = ++next_client_id_;
+ const int client_id = next_client_id_++;
// TODO(sad): crbug.com/617415 figure out how to generate a meaningful tracing
// id.
const uint64_t client_tracing_id = 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698