summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-15 08:12:38 +0000
committerfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-15 08:12:38 +0000
commitc50a9b15cf5f524441a81d98b45f778755e06dc3 (patch)
tree8b76390aea55f498e5d141e2123655237ee9ac15 /gpu
parent45a445210f04343da2a29d4f08e8cea905925b33 (diff)
downloadchromium_src-c50a9b15cf5f524441a81d98b45f778755e06dc3.zip
chromium_src-c50a9b15cf5f524441a81d98b45f778755e06dc3.tar.gz
chromium_src-c50a9b15cf5f524441a81d98b45f778755e06dc3.tar.bz2
Fix 2 crashers in GLES2Implementation:
- Finish() uses GPU_CLIENT_SINGLE_THREAD_CHECK() but is called by other methods that call this macro, triggering GPU_CHECK_EQ(0, 1) crashes. - DeleteQueriesEXTHelper was checking that pending queries had *no* results available before removing them instead of checking they *had* results available. Review URL: https://chromiumcodereview.appspot.com/10536191 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142357 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/client/gles2_implementation.cc10
-rw-r--r--gpu/command_buffer/client/gles2_implementation.h2
2 files changed, 9 insertions, 3 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index 94ad783..5d46196 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -1036,6 +1036,10 @@ void GLES2Implementation::Flush() {
void GLES2Implementation::Finish() {
GPU_CLIENT_SINGLE_THREAD_CHECK();
+ FinishHelper();
+}
+
+void GLES2Implementation::FinishHelper() {
GPU_CLIENT_LOG("[" << this << "] glFinish()");
TRACE_EVENT0("gpu", "GLES2::Finish");
// Insert the cmd to call glFinish
@@ -3002,13 +3006,13 @@ void GLES2Implementation::DeleteQueriesEXTHelper(
}
if (query_pending) {
- Finish();
+ FinishHelper();
}
for (GLsizei ii = 0; ii < n; ++ii) {
QueryTracker::Query* query = query_tracker_->GetQuery(queries[ii]);
if (query && query->Pending()) {
- GPU_CHECK(!query->CheckResultsAvailable(helper_));
+ GPU_CHECK(query->CheckResultsAvailable(helper_));
}
query_tracker_->RemoveQuery(queries[ii]);
}
@@ -3141,7 +3145,7 @@ void GLES2Implementation::GetQueryObjectuivEXT(
helper_->WaitForToken(query->token());
if (!query->CheckResultsAvailable(helper_)) {
// TODO(gman): Speed this up.
- Finish();
+ FinishHelper();
GPU_CHECK(query->CheckResultsAvailable(helper_));
}
}
diff --git a/gpu/command_buffer/client/gles2_implementation.h b/gpu/command_buffer/client/gles2_implementation.h
index e4b838e..b8c3da1 100644
--- a/gpu/command_buffer/client/gles2_implementation.h
+++ b/gpu/command_buffer/client/gles2_implementation.h
@@ -472,6 +472,8 @@ class GLES2_IMPL_EXPORT GLES2Implementation {
IdHandlerInterface* GetIdHandler(int id_namespace) const;
+ void FinishHelper();
+
GLES2Util util_;
GLES2CmdHelper* helper_;
TransferBufferInterface* transfer_buffer_;