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

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

Issue 2639293002: gpu: Add ARB_occlusion_query support. (Closed)
Patch Set: add unit test Created 3 years, 11 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 <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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 case GL_TIMESTAMP: 796 case GL_TIMESTAMP:
797 query = new TimeStampQuery(this, target, shm_id, shm_offset); 797 query = new TimeStampQuery(this, target, shm_id, shm_offset);
798 break; 798 break;
799 case GL_ANY_SAMPLES_PASSED: 799 case GL_ANY_SAMPLES_PASSED:
800 case GL_ANY_SAMPLES_PASSED_CONSERVATIVE: 800 case GL_ANY_SAMPLES_PASSED_CONSERVATIVE:
801 query = new BooleanQuery(this, target, shm_id, shm_offset); 801 query = new BooleanQuery(this, target, shm_id, shm_offset);
802 break; 802 break;
803 case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: 803 case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:
804 query = new SummedIntegerQuery(this, target, shm_id, shm_offset); 804 query = new SummedIntegerQuery(this, target, shm_id, shm_offset);
805 break; 805 break;
806 case GL_SAMPLES_PASSED:
807 query = new SummedIntegerQuery(this, target, shm_id, shm_offset);
808 break;
806 default: { 809 default: {
807 NOTREACHED(); 810 NOTREACHED();
808 } 811 }
809 } 812 }
810 std::pair<QueryMap::iterator, bool> result = 813 std::pair<QueryMap::iterator, bool> result =
811 queries_.insert(std::make_pair(client_id, query)); 814 queries_.insert(std::make_pair(client_id, query));
812 DCHECK(result.second); 815 DCHECK(result.second);
813 return query.get(); 816 return query.get();
814 } 817 }
815 818
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 for (std::pair<const GLenum, scoped_refptr<Query> >& it : active_queries_) { 1135 for (std::pair<const GLenum, scoped_refptr<Query> >& it : active_queries_) {
1133 if (it.second->IsPaused()) { 1136 if (it.second->IsPaused()) {
1134 it.second->Resume(); 1137 it.second->Resume();
1135 DCHECK(it.second->IsActive()); 1138 DCHECK(it.second->IsActive());
1136 } 1139 }
1137 } 1140 }
1138 } 1141 }
1139 1142
1140 } // namespace gles2 1143 } // namespace gles2
1141 } // namespace gpu 1144 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698