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

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

Issue 1336703002: Revert of Re-land: cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 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/command_buffer/service/query_manager.h" 5 #include "gpu/command_buffer/service/query_manager.h"
6 6
7 #include "base/atomicops.h" 7 #include "base/atomicops.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 778
779 QueryManager::~QueryManager() { 779 QueryManager::~QueryManager() {
780 DCHECK(queries_.empty()); 780 DCHECK(queries_.empty());
781 781
782 // If this triggers, that means something is keeping a reference to 782 // If this triggers, that means something is keeping a reference to
783 // a Query belonging to this. 783 // a Query belonging to this.
784 CHECK_EQ(query_count_, 0u); 784 CHECK_EQ(query_count_, 0u);
785 } 785 }
786 786
787 void QueryManager::Destroy(bool have_context) { 787 void QueryManager::Destroy(bool have_context) {
788 active_queries_.clear();
789 pending_queries_.clear(); 788 pending_queries_.clear();
790 pending_transfer_queries_.clear(); 789 pending_transfer_queries_.clear();
791 active_queries_.clear(); 790 active_queries_.clear();
792 while (!queries_.empty()) { 791 while (!queries_.empty()) {
793 Query* query = queries_.begin()->second.get(); 792 Query* query = queries_.begin()->second.get();
794 query->Destroy(have_context); 793 query->Destroy(have_context);
795 queries_.erase(queries_.begin()); 794 queries_.erase(queries_.begin());
796 } 795 }
797 } 796 }
798 797
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
1169 for (std::pair<const GLenum, scoped_refptr<Query> >& it : active_queries_) { 1168 for (std::pair<const GLenum, scoped_refptr<Query> >& it : active_queries_) {
1170 if (it.second->IsPaused()) { 1169 if (it.second->IsPaused()) {
1171 it.second->Resume(); 1170 it.second->Resume();
1172 DCHECK(it.second->IsActive()); 1171 DCHECK(it.second->IsActive());
1173 } 1172 }
1174 } 1173 }
1175 } 1174 }
1176 1175
1177 } // namespace gles2 1176 } // namespace gles2
1178 } // namespace gpu 1177 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/cmd_buffer_helper.cc ('k') | ui/compositor/test/in_process_context_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698