| OLD | NEW |
| 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 Loading... |
| 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_INVALID, stream_id); |
| 342 DCHECK_NE(kDefaultStreamId, stream_id); | 342 DCHECK_NE(gpu::GPU_STREAM_DEFAULT, stream_id); |
| 343 return stream_id; | 343 return stream_id; |
| 344 } | 344 } |
| 345 | 345 |
| 346 uint32_t GpuChannelHost::ValidateFlushIDReachedServer(int32_t stream_id, | 346 uint32_t GpuChannelHost::ValidateFlushIDReachedServer(int32_t stream_id, |
| 347 bool force_validate) { | 347 bool force_validate) { |
| 348 // Store what flush ids we will be validating for all streams. | 348 // Store what flush ids we will be validating for all streams. |
| 349 base::hash_map<int32_t, uint32_t> validate_flushes; | 349 base::hash_map<int32_t, uint32_t> validate_flushes; |
| 350 uint32_t flushed_stream_flush_id = 0; | 350 uint32_t flushed_stream_flush_id = 0; |
| 351 uint32_t verified_stream_flush_id = 0; | 351 uint32_t verified_stream_flush_id = 0; |
| 352 { | 352 { |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 | 472 |
| 473 listeners_.clear(); | 473 listeners_.clear(); |
| 474 } | 474 } |
| 475 | 475 |
| 476 bool GpuChannelHost::MessageFilter::IsLost() const { | 476 bool GpuChannelHost::MessageFilter::IsLost() const { |
| 477 AutoLock lock(lock_); | 477 AutoLock lock(lock_); |
| 478 return lost_; | 478 return lost_; |
| 479 } | 479 } |
| 480 | 480 |
| 481 } // namespace gpu | 481 } // namespace gpu |
| OLD | NEW |