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

Unified Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 18340003: gpu: Fix removal of pending queries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 | « no previous file | gpu/command_buffer/client/query_tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gles2_implementation.cc
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index fbc92d58939c8c39999c73c2d3a23393820a936c..1bc3f0b39f7fbddfe3ef1c9470ba0dbffd374119 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -3174,36 +3174,10 @@ void GLES2Implementation::DeleteQueriesEXTHelper(
"glDeleteTextures", "id not created by this context.");
return;
}
- // When you delete a query you can't mark its memory as unused until it's
- // completed.
- // Note: If you don't do this you won't mess up the service but you will mess
- // up yourself.
-
- // TODO(gman): Consider making this faster by putting pending quereies
- // on some queue to be removed when they are finished.
- bool query_pending = false;
- for (GLsizei ii = 0; ii < n; ++ii) {
- QueryTracker::Query* query = query_tracker_->GetQuery(queries[ii]);
- if (query && query->Pending()) {
- query_pending = true;
- break;
- }
- }
- if (query_pending) {
- WaitForCmd();
- }
+ for (GLsizei ii = 0; ii < n; ++ii)
+ query_tracker_->RemoveQuery(queries[ii]);
- for (GLsizei ii = 0; ii < n; ++ii) {
- QueryTracker::Query* query = query_tracker_->GetQuery(queries[ii]);
- if (query && query->Pending()) {
- if (!query->CheckResultsAvailable(helper_)) {
- // Should only get here on context lost.
- MustBeContextLost();
- }
- }
- query_tracker_->RemoveQuery(queries[ii], helper_->IsContextLost());
- }
helper_->DeleteQueriesEXTImmediate(n, queries);
}
« no previous file with comments | « no previous file | gpu/command_buffer/client/query_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698