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

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

Issue 1199313008: Allowed GLES query target migration between binary occlusion types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 c74a65000c30408a5ca0695560d864e24d0d5d1c..541689db904c5227e30f720d8330428356960599 100644
--- a/gpu/command_buffer/service/query_manager.cc
+++ b/gpu/command_buffer/service/query_manager.cc
@@ -644,6 +644,23 @@ bool QueryManager::Query::MarkAsCompleted(uint64 result) {
return true;
}
+bool QueryManager::Query::UpdateTarget(GLenum target) {
+ switch (target_) {
+ // The boolean occlusion targets are interchangable.
+ case GL_ANY_SAMPLES_PASSED:
+ case GL_ANY_SAMPLES_PASSED_CONSERVATIVE:
+ if (target == GL_ANY_SAMPLES_PASSED ||
+ target == GL_ANY_SAMPLES_PASSED_CONSERVATIVE) {
+ target_ = target;
+ return true;
+ };
+ return false;
+ // Otherwise target is finalized the first time beginQuery() is called.
+ default:
+ return target_ == target;
+ }
+}
+
bool QueryManager::ProcessPendingQueries(bool did_finish) {
while (!pending_queries_.empty()) {
Query* query = pending_queries_.front().get();
« 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