Use a static function instead of a static initializer for defaultBlockInfo.

BUG=angle:640

Change-Id: I5fe568c9a2b492a5bd8a42142762229c5f992c7e
Reviewed-on: https://chromium-review.googlesource.com/198248
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/common/shadervars.cpp b/src/common/shadervars.cpp
index c9843dc..a8e9759 100644
--- a/src/common/shadervars.cpp
+++ b/src/common/shadervars.cpp
@@ -67,7 +67,10 @@
 {
 }
 
-const BlockMemberInfo BlockMemberInfo::defaultBlockInfo(-1, -1, -1, false);
+BlockMemberInfo BlockMemberInfo::getDefaultBlockInfo()
+{
+    return BlockMemberInfo(-1, -1, -1, false);
+}
 
 InterfaceBlock::InterfaceBlock(const char *name, unsigned int arraySize, unsigned int registerIndex)
     : name(name),
diff --git a/src/common/shadervars.h b/src/common/shadervars.h
index eba0141..9d66f0e 100644
--- a/src/common/shadervars.h
+++ b/src/common/shadervars.h
@@ -95,7 +95,7 @@
     int matrixStride;
     bool isRowMajorMatrix;
 
-    static const BlockMemberInfo defaultBlockInfo;
+    static BlockMemberInfo getDefaultBlockInfo();
 };
 
 typedef std::vector<BlockMemberInfo> BlockMemberInfoArray;
diff --git a/src/libGLESv2/ProgramBinary.cpp b/src/libGLESv2/ProgramBinary.cpp
index 5ab101a..302315e 100644
--- a/src/libGLESv2/ProgramBinary.cpp
+++ b/src/libGLESv2/ProgramBinary.cpp
@@ -1564,9 +1564,9 @@
     // special case for gl_DepthRange, the only built-in uniform (also a struct)
     if (vertexShader->usesDepthRange() || fragmentShader->usesDepthRange())
     {
-        mUniforms.push_back(new LinkedUniform(GL_FLOAT, GL_HIGH_FLOAT, "gl_DepthRange.near", 0, -1, gl::BlockMemberInfo::defaultBlockInfo));
-        mUniforms.push_back(new LinkedUniform(GL_FLOAT, GL_HIGH_FLOAT, "gl_DepthRange.far", 0, -1, gl::BlockMemberInfo::defaultBlockInfo));
-        mUniforms.push_back(new LinkedUniform(GL_FLOAT, GL_HIGH_FLOAT, "gl_DepthRange.diff", 0, -1, gl::BlockMemberInfo::defaultBlockInfo));
+        mUniforms.push_back(new LinkedUniform(GL_FLOAT, GL_HIGH_FLOAT, "gl_DepthRange.near", 0, -1, gl::BlockMemberInfo::getDefaultBlockInfo()));
+        mUniforms.push_back(new LinkedUniform(GL_FLOAT, GL_HIGH_FLOAT, "gl_DepthRange.far", 0, -1, gl::BlockMemberInfo::getDefaultBlockInfo()));
+        mUniforms.push_back(new LinkedUniform(GL_FLOAT, GL_HIGH_FLOAT, "gl_DepthRange.diff", 0, -1, gl::BlockMemberInfo::getDefaultBlockInfo()));
     }
 
     if (!linkUniformBlocks(infoLog, vertexShader->getInterfaceBlocks(), fragmentShader->getInterfaceBlocks()))
@@ -2012,7 +2012,7 @@
     }
     else
     {
-        uniform = new LinkedUniform(constant.type, constant.precision, constant.name, constant.arraySize, -1, gl::BlockMemberInfo::defaultBlockInfo);
+        uniform = new LinkedUniform(constant.type, constant.precision, constant.name, constant.arraySize, -1, gl::BlockMemberInfo::getDefaultBlockInfo());
         uniform->registerElement = constant.elementIndex;
     }