diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-07 16:41:28 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-07 16:41:28 +0000 |
commit | 4c9abdb7f2f33059a575abd55548b457bcad9fd8 (patch) | |
tree | 18941f301d5c3c4db329916b35f2567b45017efa /chrome/renderer | |
parent | 39b9f7eeb2c14ba1188051d3203d18a4664c3e36 (diff) | |
download | chromium_src-4c9abdb7f2f33059a575abd55548b457bcad9fd8.zip chromium_src-4c9abdb7f2f33059a575abd55548b457bcad9fd8.tar.gz chromium_src-4c9abdb7f2f33059a575abd55548b457bcad9fd8.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/5254006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68480 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-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 6479a7a..659c8be 100644 --- a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc +++ b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc @@ -708,7 +708,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 = @@ -731,7 +731,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 = @@ -749,7 +749,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 = |