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

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

Issue 2732533002: Remove a redundant clear() call (Closed)
Patch Set: Created 3 years, 9 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/query_manager.h" 5 #include "gpu/command_buffer/service/query_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/atomicops.h" 10 #include "base/atomicops.h"
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 735
736 // If this triggers, that means something is keeping a reference to 736 // If this triggers, that means something is keeping a reference to
737 // a Query belonging to this. 737 // a Query belonging to this.
738 CHECK_EQ(query_count_, 0u); 738 CHECK_EQ(query_count_, 0u);
739 } 739 }
740 740
741 void QueryManager::Destroy(bool have_context) { 741 void QueryManager::Destroy(bool have_context) {
742 active_queries_.clear(); 742 active_queries_.clear();
743 pending_queries_.clear(); 743 pending_queries_.clear();
744 pending_transfer_queries_.clear(); 744 pending_transfer_queries_.clear();
745 active_queries_.clear();
746 while (!queries_.empty()) { 745 while (!queries_.empty()) {
747 Query* query = queries_.begin()->second.get(); 746 Query* query = queries_.begin()->second.get();
748 query->Destroy(have_context); 747 query->Destroy(have_context);
749 queries_.erase(queries_.begin()); 748 queries_.erase(queries_.begin());
750 } 749 }
751 } 750 }
752 751
753 error::Error QueryManager::SetDisjointSync(int32_t shm_id, 752 error::Error QueryManager::SetDisjointSync(int32_t shm_id,
754 uint32_t shm_offset) { 753 uint32_t shm_offset) {
755 if (disjoint_notify_shm_id_ != -1 || shm_id == -1) 754 if (disjoint_notify_shm_id_ != -1 || shm_id == -1)
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 for (std::pair<const GLenum, scoped_refptr<Query> >& it : active_queries_) { 1134 for (std::pair<const GLenum, scoped_refptr<Query> >& it : active_queries_) {
1136 if (it.second->IsPaused()) { 1135 if (it.second->IsPaused()) {
1137 it.second->Resume(); 1136 it.second->Resume();
1138 DCHECK(it.second->IsActive()); 1137 DCHECK(it.second->IsActive());
1139 } 1138 }
1140 } 1139 }
1141 } 1140 }
1142 1141
1143 } // namespace gles2 1142 } // namespace gles2
1144 } // namespace gpu 1143 } // 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