diff options
author | apatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-08 20:46:37 +0000 |
---|---|---|
committer | apatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-08 20:46:37 +0000 |
commit | 03f882aa62d925a6f27e9038f4f7235be55afe02 (patch) | |
tree | 4f06e41eb249f8f9f335f292c35f27822221f636 /gpu/command_buffer | |
parent | de049e2d0eab6145c2805de17ff838f58c14fdd3 (diff) | |
download | chromium_src-03f882aa62d925a6f27e9038f4f7235be55afe02.zip chromium_src-03f882aa62d925a6f27e9038f4f7235be55afe02.tar.gz chromium_src-03f882aa62d925a6f27e9038f4f7235be55afe02.tar.bz2 |
Fixed some bugs that prevented the GPU plugin from shutting down without crashing.
TEST=trybots
BUG=none
Review URL: http://codereview.chromium.org/529004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35819 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer')
-rw-r--r-- | gpu/command_buffer/client/gles2_implementation.cc | 4 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_implementation.h | 2 | ||||
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc index f792977..0b1f341 100644 --- a/gpu/command_buffer/client/gles2_implementation.cc +++ b/gpu/command_buffer/client/gles2_implementation.cc @@ -40,6 +40,10 @@ GLES2Implementation::GLES2Implementation( result_shm_offset_ = transfer_buffer_.GetOffset(result_buffer_); } +GLES2Implementation::~GLES2Implementation() { + transfer_buffer_.Free(result_buffer_); +} + void GLES2Implementation::MakeIds(GLsizei n, GLuint* ids) { for (GLsizei ii = 0; ii < n; ++ii) { ids[ii] = id_allocator_.AllocateID(); diff --git a/gpu/command_buffer/client/gles2_implementation.h b/gpu/command_buffer/client/gles2_implementation.h index 6415d67..35776704 100644 --- a/gpu/command_buffer/client/gles2_implementation.h +++ b/gpu/command_buffer/client/gles2_implementation.h @@ -27,6 +27,8 @@ class GLES2Implementation { void* transfer_buffer, int32 transfer_buffer_id); + ~GLES2Implementation(); + // The GLES2CmdHelper being used by this GLES2Implementation. You can use // this to issue cmds at a lower level for certain kinds of optimization. GLES2CmdHelper* helper() const { diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index ade16c6..282fb99 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -1148,8 +1148,7 @@ GLenum GLES2DecoderImpl::GetGLError() { // Check the GL error first, then our wrapped error. GLenum error = glGetError(); if (error == GL_NO_ERROR && error_bits_ != 0) { - uint32 mask = 1; - while (mask) { + for (uint32 mask = 1; mask != 0; mask = mask << 1) { if ((error_bits_ & mask) != 0) { error = GLErrorBitToGLError(mask); break; |