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

Side by Side Diff: gpu/command_buffer/service/sync_point_manager.cc

Issue 2237653002: Disable flaky assert in ~SyncPointManager on CrOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/command_buffer/service/sync_point_manager.h" 5 #include "gpu/command_buffer/service/sync_point_manager.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 : sync_point_manager_(sync_point_manager), 382 : sync_point_manager_(sync_point_manager),
383 client_state_(new SyncPointClientState(order_data)), 383 client_state_(new SyncPointClientState(order_data)),
384 namespace_id_(namespace_id), 384 namespace_id_(namespace_id),
385 client_id_(client_id) {} 385 client_id_(client_id) {}
386 386
387 SyncPointManager::SyncPointManager(bool allow_threaded_wait) { 387 SyncPointManager::SyncPointManager(bool allow_threaded_wait) {
388 global_order_num_.GetNext(); 388 global_order_num_.GetNext();
389 } 389 }
390 390
391 SyncPointManager::~SyncPointManager() { 391 SyncPointManager::~SyncPointManager() {
392 // TODO(reveman): Figure out why this flakes on CrOS: http://crbug.com/630625
393 #if !defined(OS_CHROMEOS)
392 for (const ClientMap& client_map : client_maps_) { 394 for (const ClientMap& client_map : client_maps_) {
393 DCHECK(client_map.empty()); 395 DCHECK(client_map.empty());
394 } 396 }
397 #endif
395 } 398 }
396 399
397 std::unique_ptr<SyncPointClient> SyncPointManager::CreateSyncPointClient( 400 std::unique_ptr<SyncPointClient> SyncPointManager::CreateSyncPointClient(
398 scoped_refptr<SyncPointOrderData> order_data, 401 scoped_refptr<SyncPointOrderData> order_data,
399 CommandBufferNamespace namespace_id, 402 CommandBufferNamespace namespace_id,
400 CommandBufferId client_id) { 403 CommandBufferId client_id) {
401 DCHECK_GE(namespace_id, 0); 404 DCHECK_GE(namespace_id, 0);
402 DCHECK_LT(static_cast<size_t>(namespace_id), arraysize(client_maps_)); 405 DCHECK_LT(static_cast<size_t>(namespace_id), arraysize(client_maps_));
403 base::AutoLock auto_lock(client_maps_lock_); 406 base::AutoLock auto_lock(client_maps_lock_);
404 407
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 DCHECK_LT(static_cast<size_t>(namespace_id), arraysize(client_maps_)); 445 DCHECK_LT(static_cast<size_t>(namespace_id), arraysize(client_maps_));
443 446
444 base::AutoLock auto_lock(client_maps_lock_); 447 base::AutoLock auto_lock(client_maps_lock_);
445 ClientMap& client_map = client_maps_[namespace_id]; 448 ClientMap& client_map = client_maps_[namespace_id];
446 ClientMap::iterator it = client_map.find(client_id); 449 ClientMap::iterator it = client_map.find(client_id);
447 DCHECK(it != client_map.end()); 450 DCHECK(it != client_map.end());
448 client_map.erase(it); 451 client_map.erase(it);
449 } 452 }
450 453
451 } // namespace gpu 454 } // namespace gpu
OLDNEW
« 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