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

Unified Diff: gpu/command_buffer/service/query_manager.cc

Issue 226483003: Flag INV_OP during BeginQuery if id is not obtained from GenQueriesEXT. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments + nits. Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/query_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/query_manager.cc
diff --git a/gpu/command_buffer/service/query_manager.cc b/gpu/command_buffer/service/query_manager.cc
index 30c036ed98d02dc0b211b5b999b7611bfd2b2a9b..ffb54cca5142a635d692d955f547c9620322ca73 100644
--- a/gpu/command_buffer/service/query_manager.cc
+++ b/gpu/command_buffer/service/query_manager.cc
@@ -512,6 +512,18 @@ QueryManager::Query* QueryManager::CreateQuery(
return query.get();
}
+void QueryManager::GenQueries(GLsizei n, const GLuint* queries) {
+ DCHECK_GE(n, 0);
+ for (GLsizei i = 0; i < n; ++i) {
+ generated_query_ids_.insert(queries[i]);
+ }
+}
+
+bool QueryManager::IsValidQuery(GLuint id) {
+ GeneratedQueryIds::iterator it = generated_query_ids_.find(id);
+ return it != generated_query_ids_.end();
+}
+
QueryManager::Query* QueryManager::GetQuery(
GLuint client_id) {
QueryMap::iterator it = queries_.find(client_id);
@@ -526,6 +538,7 @@ void QueryManager::RemoveQuery(GLuint client_id) {
query->MarkAsDeleted();
queries_.erase(it);
}
+ generated_query_ids_.erase(client_id);
}
void QueryManager::StartTracking(QueryManager::Query* /* query */) {
« no previous file with comments | « gpu/command_buffer/service/query_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698