summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authoralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-19 20:32:47 +0000
committeralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-19 20:32:47 +0000
commit3b9448e6acb5fd762afc0c3b3957a65e9d3ef092 (patch)
tree5404996033898938fb450818a920221654dbadc6 /third_party
parentbd78a645002a085fb762b61e618f66ffc220b9b0 (diff)
downloadchromium_src-3b9448e6acb5fd762afc0c3b3957a65e9d3ef092.zip
chromium_src-3b9448e6acb5fd762afc0c3b3957a65e9d3ef092.tar.gz
chromium_src-3b9448e6acb5fd762afc0c3b3957a65e9d3ef092.tar.bz2
Initialized variables passed to GL functions. Command buffer now only allows initialized variables unless it is compiled for native-client. We would need to exclude pepper plugins too. For now I have initialized the gpu demo variables.
TBR=gman Review URL: http://codereview.chromium.org/7448011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93087 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.c2
-rw-r--r--third_party/gles2_book/Common/Source/esShader.c12
-rw-r--r--third_party/gles2_book/README.chromium5
3 files changed, 12 insertions, 7 deletions
diff --git a/third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.c b/third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.c
index b884e8d..696fe25 100644
--- a/third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.c
+++ b/third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.c
@@ -121,7 +121,7 @@ void stDraw ( ESContext *esContext )
{ 1.0f, 1.0f, 0.0f, 0.0f }
};
- GLint numStencilBits;
+ GLint numStencilBits = 0;
GLuint stencilValues[NumTests] = {
0x7, // Result of test 0
0x0, // Result of test 1
diff --git a/third_party/gles2_book/Common/Source/esShader.c b/third_party/gles2_book/Common/Source/esShader.c
index 1e5c5e6..80c1376 100644
--- a/third_party/gles2_book/Common/Source/esShader.c
+++ b/third_party/gles2_book/Common/Source/esShader.c
@@ -42,8 +42,8 @@
//
GLuint esLoadShader ( GLenum type, const char *shaderSrc )
{
- GLuint shader;
- GLint compiled;
+ GLuint shader = 0;
+ GLint compiled = 0;
// Create the shader object
shader = glCreateShader ( type );
@@ -95,10 +95,10 @@ GLuint esLoadShader ( GLenum type, const char *shaderSrc )
//
GLuint esLoadProgram ( const char *vertShaderSrc, const char *fragShaderSrc )
{
- GLuint vertexShader;
- GLuint fragmentShader;
- GLuint programObject;
- GLint linked;
+ GLuint vertexShader = 0;
+ GLuint fragmentShader = 0;
+ GLuint programObject = 0;
+ GLint linked = 0;
// Load the vertex/fragment shaders
vertexShader = esLoadShader ( GL_VERTEX_SHADER, vertShaderSrc );
diff --git a/third_party/gles2_book/README.chromium b/third_party/gles2_book/README.chromium
index 9adbaff..e79e4fe 100644
--- a/third_party/gles2_book/README.chromium
+++ b/third_party/gles2_book/README.chromium
@@ -2,6 +2,7 @@ Name: OpenGL ES 2.0 Programming Guide
Short Name: opengles-book
URL: http://opengles-book.com/
Version: unknown
+Security Critical: no
Description:
Code samples from OpenGL ES 2.0 Programming Guide.
@@ -31,4 +32,8 @@ Local Modifications:
- Chapter_9/Simple_TextureCubemap/Simple_TextureCubemap.h
- Chapter_9/TextureWrap/TextureWrap.h
- Chapter_11/Stencil_Test/Stencil_Test.h
+
+ Initialized local variables:
+ - Chapter_11/Stencil_Test/Stencil_Test.c
+ - Common/Source/esShader.c