Eliminated storing decorated uniform names.

TRAC #22326
Signed-off-by: Daniel Koch
Signed-off-by: Shannon Woods
Author: Nicolas Capens

git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1635 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Uniform.cpp b/src/libGLESv2/Uniform.cpp
index 0412ce9..22f9431 100644
--- a/src/libGLESv2/Uniform.cpp
+++ b/src/libGLESv2/Uniform.cpp
@@ -11,8 +11,8 @@
 namespace gl

 {

 

-Uniform::Uniform(GLenum type, const std::string &_name, unsigned int arraySize)

-    : type(type), _name(_name), name(undecorate(_name)), arraySize(arraySize)

+Uniform::Uniform(GLenum type, const std::string &name, unsigned int arraySize)

+    : type(type), name(name), arraySize(arraySize)

 {

     int bytes = gl::UniformInternalSize(type) * elementCount();

     data = new unsigned char[bytes];

@@ -27,17 +27,7 @@
 

 bool Uniform::isArray() const

 {

-    if (name != _name)   // D3D9_REPLACE

-    {

-        size_t dot = _name.find_last_of('.');

-        if (dot == std::string::npos) dot = -1;

-

-        return _name.compare(dot + 1, dot + 4, "ar_") == 0;

-    }

-    else

-    {

-        return arraySize > 0;

-    }

+    return arraySize > 0;

 }

 

 unsigned int Uniform::elementCount() const

@@ -50,28 +40,4 @@
     return VariableRowCount(type) * elementCount();

 }

 

-std::string Uniform::undecorate(const std::string &_name)

-{

-    std::string name = _name;

-    

-    // Remove any structure field decoration

-    size_t pos = 0;

-    while ((pos = name.find("._", pos)) != std::string::npos)

-    {

-        name.replace(pos, 2, ".");

-    }

-

-    // Remove the leading decoration

-    if (name[0] == '_')

-    {

-        return name.substr(1);

-    }

-    else if (name.compare(0, 3, "ar_") == 0)

-    {

-        return name.substr(3);

-    }

-    

-    return name;

-}

-

 }