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

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

Issue 1230203007: Re-land: cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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
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();
788 pending_queries_.clear(); 789 pending_queries_.clear();
789 pending_transfer_queries_.clear(); 790 pending_transfer_queries_.clear();
790 active_queries_.clear(); 791 active_queries_.clear();
791 while (!queries_.empty()) { 792 while (!queries_.empty()) {
792 Query* query = queries_.begin()->second.get(); 793 Query* query = queries_.begin()->second.get();
793 query->Destroy(have_context); 794 query->Destroy(have_context);
794 queries_.erase(queries_.begin()); 795 queries_.erase(queries_.begin());
795 } 796 }
796 } 797 }
797 798
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 for (std::pair<const GLenum, scoped_refptr<Query> >& it : active_queries_) { 1169 for (std::pair<const GLenum, scoped_refptr<Query> >& it : active_queries_) {
1169 if (it.second->IsPaused()) { 1170 if (it.second->IsPaused()) {
1170 it.second->Resume(); 1171 it.second->Resume();
1171 DCHECK(it.second->IsActive()); 1172 DCHECK(it.second->IsActive());
1172 } 1173 }
1173 } 1174 }
1174 } 1175 }
1175 1176
1176 } // namespace gles2 1177 } // namespace gles2
1177 } // namespace gpu 1178 } // 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