diff options
| author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-24 19:32:50 +0000 |
|---|---|---|
| committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-24 19:32:50 +0000 |
| commit | abd3ee31ea51b47264986e4f5a3109582fbef97d (patch) | |
| tree | 6780c5aad3a11d7e4472dba9373c7d40d756f075 /chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc | |
| parent | 826fa729e3763314e75a8391af8b7ca50f3aa573 (diff) | |
| download | chromium_src-abd3ee31ea51b47264986e4f5a3109582fbef97d.zip chromium_src-abd3ee31ea51b47264986e4f5a3109582fbef97d.tar.gz chromium_src-abd3ee31ea51b47264986e4f5a3109582fbef97d.tar.bz2 | |
Initialize destinations variables before calling GL functions
because if the context is lost those variables will
be uninitialized.
TEST=ran chrome, conformance tests, unit tests and hand edited gles2_demo to test
BUG=none
Review URL: http://codereview.chromium.org/5305005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67293 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc')
| -rw-r--r-- | chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc index af89470..17d0e22 100644 --- a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc +++ b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc @@ -693,7 +693,7 @@ WebKit::WebString WebGraphicsContext3DCommandBufferImpl::getProgramInfoLog( scoped_array<GLchar> log(new GLchar[logLength]); if (!log.get()) return WebKit::WebString(); - GLsizei returnedLogLength; + GLsizei returnedLogLength = 0; glGetProgramInfoLog(program, logLength, &returnedLogLength, log.get()); DCHECK_EQ(logLength, returnedLogLength + 1); WebKit::WebString res = @@ -716,7 +716,7 @@ WebKit::WebString WebGraphicsContext3DCommandBufferImpl::getShaderInfoLog( scoped_array<GLchar> log(new GLchar[logLength]); if (!log.get()) return WebKit::WebString(); - GLsizei returnedLogLength; + GLsizei returnedLogLength = 0; glGetShaderInfoLog(shader, logLength, &returnedLogLength, log.get()); DCHECK_EQ(logLength, returnedLogLength + 1); WebKit::WebString res = @@ -734,7 +734,7 @@ WebKit::WebString WebGraphicsContext3DCommandBufferImpl::getShaderSource( scoped_array<GLchar> log(new GLchar[logLength]); if (!log.get()) return WebKit::WebString(); - GLsizei returnedLogLength; + GLsizei returnedLogLength = 0; glGetShaderSource(shader, logLength, &returnedLogLength, log.get()); DCHECK_EQ(logLength, returnedLogLength + 1); WebKit::WebString res = |
