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

Side by Side Diff: gpu/ipc/client/gpu_channel_host.cc

Issue 1949023005: gpu: Add flag for enabling asynchronous worker context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/ipc/client/gpu_channel_host.h" 5 #include "gpu/ipc/client/gpu_channel_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/atomic_sequence_num.h" 10 #include "base/atomic_sequence_num.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 int32_t GpuChannelHost::ReserveImageId() { 331 int32_t GpuChannelHost::ReserveImageId() {
332 return next_image_id_.GetNext(); 332 return next_image_id_.GetNext();
333 } 333 }
334 334
335 int32_t GpuChannelHost::GenerateRouteID() { 335 int32_t GpuChannelHost::GenerateRouteID() {
336 return next_route_id_.GetNext(); 336 return next_route_id_.GetNext();
337 } 337 }
338 338
339 int32_t GpuChannelHost::GenerateStreamID() { 339 int32_t GpuChannelHost::GenerateStreamID() {
340 const int32_t stream_id = next_stream_id_.GetNext(); 340 const int32_t stream_id = next_stream_id_.GetNext();
341 DCHECK_NE(0, stream_id); 341 DCHECK_NE(gpu::GPU_STREAM_DEFAULT, stream_id);
342 DCHECK_NE(kDefaultStreamId, stream_id);
343 return stream_id; 342 return stream_id;
344 } 343 }
345 344
346 uint32_t GpuChannelHost::ValidateFlushIDReachedServer(int32_t stream_id, 345 uint32_t GpuChannelHost::ValidateFlushIDReachedServer(int32_t stream_id,
347 bool force_validate) { 346 bool force_validate) {
348 // Store what flush ids we will be validating for all streams. 347 // Store what flush ids we will be validating for all streams.
349 base::hash_map<int32_t, uint32_t> validate_flushes; 348 base::hash_map<int32_t, uint32_t> validate_flushes;
350 uint32_t flushed_stream_flush_id = 0; 349 uint32_t flushed_stream_flush_id = 0;
351 uint32_t verified_stream_flush_id = 0; 350 uint32_t verified_stream_flush_id = 0;
352 { 351 {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 471
473 listeners_.clear(); 472 listeners_.clear();
474 } 473 }
475 474
476 bool GpuChannelHost::MessageFilter::IsLost() const { 475 bool GpuChannelHost::MessageFilter::IsLost() const {
477 AutoLock lock(lock_); 476 AutoLock lock(lock_);
478 return lost_; 477 return lost_;
479 } 478 }
480 479
481 } // namespace gpu 480 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698