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

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

Issue 10883036: Make glGetQueryObjectuivEXT return true for GL_QUERY_RESULT_AVAILABLE_EXT (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.h ('k') | gpu/command_buffer/client/query_tracker.cc » ('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 1f31f8c39d9dac06e1b3302370fe5ab34a29d190..604d3d9445296377c251e5c9298a0e2b6ce23548 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -422,8 +422,7 @@ GLES2Implementation::GLES2Implementation(
debug_(false),
use_count_(0),
current_query_(NULL),
- error_message_callback_(NULL),
- context_lost_(false) {
+ error_message_callback_(NULL) {
GPU_DCHECK(helper);
GPU_DCHECK(transfer_buffer);
@@ -1097,12 +1096,13 @@ void GLES2Implementation::Finish() {
}
bool GLES2Implementation::MustBeContextLost() {
- if (!context_lost_) {
+ bool context_lost = helper_->IsContextLost();
+ if (!context_lost) {
FinishHelper();
- context_lost_ = error::IsError(helper_->command_buffer()->GetLastError());
+ context_lost = helper_->IsContextLost();
}
- GPU_CHECK(context_lost_);
- return context_lost_;
+ GPU_CHECK(context_lost);
+ return context_lost;
}
void GLES2Implementation::FinishHelper() {
@@ -3088,7 +3088,7 @@ void GLES2Implementation::DeleteQueriesEXTHelper(
MustBeContextLost();
}
}
- query_tracker_->RemoveQuery(queries[ii], context_lost_);
+ query_tracker_->RemoveQuery(queries[ii], helper_->IsContextLost());
}
helper_->DeleteQueriesEXTImmediate(n, queries);
}
@@ -3153,7 +3153,7 @@ void GLES2Implementation::EndQueryEXT(GLenum target) {
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] EndQueryEXT("
<< GLES2Util::GetStringQueryTarget(target) << ")");
// Don't do anything if the context is lost.
- if (context_lost_) {
+ if (helper_->IsContextLost()) {
return;
}
@@ -3196,11 +3196,6 @@ void GLES2Implementation::GetQueryObjectuivEXT(
<< GLES2Util::GetStringQueryObjectParameter(pname) << ", "
<< static_cast<const void*>(params) << ")");
- // exit if the context is lost.
- if (context_lost_) {
- return;
- }
-
QueryTracker::Query* query = query_tracker_->GetQuery(id);
if (!query) {
SetGLError(GL_INVALID_OPERATION, "glQueryObjectuivEXT", "unknown query id");
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.h ('k') | gpu/command_buffer/client/query_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698