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 /media | |
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 'media')
-rw-r--r-- | media/tools/player_x11/gl_video_renderer.cc | 6 | ||||
-rw-r--r-- | media/tools/player_x11/gles_video_renderer.cc | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/media/tools/player_x11/gl_video_renderer.cc b/media/tools/player_x11/gl_video_renderer.cc index eef1a25..68b317f 100644 --- a/media/tools/player_x11/gl_video_renderer.cc +++ b/media/tools/player_x11/gl_video_renderer.cc @@ -169,7 +169,7 @@ bool GlVideoRenderer::OnInitialize(media::VideoDecoder* decoder) { glGetShaderiv(vertex_shader, GL_COMPILE_STATUS, &result); if (!result) { char log[kErrorSize]; - int len; + int len = 0; glGetShaderInfoLog(vertex_shader, kErrorSize - 1, &len, log); log[kErrorSize - 1] = 0; LOG(FATAL) << log; @@ -186,7 +186,7 @@ bool GlVideoRenderer::OnInitialize(media::VideoDecoder* decoder) { glGetShaderiv(fragment_shader, GL_COMPILE_STATUS, &result); if (!result) { char log[kErrorSize]; - int len; + int len = 0; glGetShaderInfoLog(fragment_shader, kErrorSize - 1, &len, log); log[kErrorSize - 1] = 0; LOG(FATAL) << log; @@ -199,7 +199,7 @@ bool GlVideoRenderer::OnInitialize(media::VideoDecoder* decoder) { glGetProgramiv(program, GL_LINK_STATUS, &result); if (!result) { char log[kErrorSize]; - int len; + int len = 0; glGetProgramInfoLog(program, kErrorSize - 1, &len, log); log[kErrorSize - 1] = 0; LOG(FATAL) << log; diff --git a/media/tools/player_x11/gles_video_renderer.cc b/media/tools/player_x11/gles_video_renderer.cc index 8bd8b3e..104de5f 100644 --- a/media/tools/player_x11/gles_video_renderer.cc +++ b/media/tools/player_x11/gles_video_renderer.cc @@ -364,7 +364,7 @@ void GlesVideoRenderer::CreateShader(GLuint program, glGetShaderiv(shader, GL_COMPILE_STATUS, &result); if (!result) { char log[kErrorSize]; - int len; + int len = 0; glGetShaderInfoLog(shader, kErrorSize - 1, &len, log); log[kErrorSize - 1] = 0; LOG(FATAL) << log; @@ -379,7 +379,7 @@ void GlesVideoRenderer::LinkProgram(GLuint program) { glGetProgramiv(program, GL_LINK_STATUS, &result); if (!result) { char log[kErrorSize]; - int len; + int len = 0; glGetProgramInfoLog(program, kErrorSize - 1, &len, log); log[kErrorSize - 1] = 0; LOG(FATAL) << log; |