Fix lots of variable shadowing in ANGLE

BUG=angle:877

Change-Id: I15168ae32605b26aee08274464ffe68adb5a7e87
Reviewed-on: https://chromium-review.googlesource.com/242351
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Austin Kinross <aukinros@microsoft.com>
diff --git a/src/libANGLE/renderer/d3d/TextureD3D.cpp b/src/libANGLE/renderer/d3d/TextureD3D.cpp
index 7b7c822..a808344 100644
--- a/src/libANGLE/renderer/d3d/TextureD3D.cpp
+++ b/src/libANGLE/renderer/d3d/TextureD3D.cpp
@@ -166,8 +166,6 @@
 
     if (pixelData != NULL)
     {
-        gl::Error error(GL_NO_ERROR);
-
         if (shouldUseSetData(image))
         {
             error = mTexStorage->setData(index, image, NULL, type, unpack, pixelData);
@@ -210,7 +208,7 @@
             return mTexStorage->setData(index, image, &area, type, unpack, pixelData);
         }
 
-        gl::Error error = image->loadData(area, unpack.alignment, type, pixelData);
+        error = image->loadData(area, unpack.alignment, type, pixelData);
         if (error.isError())
         {
             return error;
@@ -245,7 +243,7 @@
         ASSERT(image);
 
         gl::Box fullImageArea(0, 0, 0, image->getWidth(), image->getHeight(), image->getDepth());
-        gl::Error error = image->loadCompressedData(fullImageArea, pixelData);
+        error = image->loadCompressedData(fullImageArea, pixelData);
         if (error.isError())
         {
             return error;
@@ -272,7 +270,7 @@
         ImageD3D *image = getImage(index);
         ASSERT(image);
 
-        gl::Error error = image->loadCompressedData(area, pixelData);
+        error = image->loadCompressedData(area, pixelData);
         if (error.isError())
         {
             return error;
@@ -752,7 +750,7 @@
 
         if (sourceArea.width != 0 && sourceArea.height != 0 && isValidLevel(level))
         {
-            gl::Error error = mRenderer->copyImage2D(source, sourceArea, internalFormat, destOffset, mTexStorage, level);
+            error = mRenderer->copyImage2D(source, sourceArea, internalFormat, destOffset, mTexStorage, level);
             if (error.isError())
             {
                 return error;
@@ -1682,11 +1680,11 @@
             size.height != storageHeight ||
             internalformat != storageFormat)   // Discard mismatched storage
         {
-            for (int level = 0; level < gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS; level++)
+            for (int dirtyLevel = 0; dirtyLevel < gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS; dirtyLevel++)
             {
-                for (int faceIndex = 0; faceIndex < 6; faceIndex++)
+                for (int dirtyFace = 0; dirtyFace < 6; faceIndex++)
                 {
-                    mImageArray[faceIndex][level]->markDirty();
+                    mImageArray[dirtyFace][dirtyLevel]->markDirty();
                 }
             }
 
@@ -2811,11 +2809,11 @@
             size.depth != storageDepth ||
             internalformat != storageFormat)   // Discard mismatched storage
         {
-            for (int level = 0; level < gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS; level++)
+            for (int dirtyLevel = 0; dirtyLevel < gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS; dirtyLevel++)
             {
-                for (int layer = 0; layer < mLayerCounts[level]; layer++)
+                for (int dirtyLayer = 0; dirtyLayer < mLayerCounts[dirtyLevel]; dirtyLayer++)
                 {
-                    mImageArray[level][layer]->markDirty();
+                    mImageArray[dirtyLevel][dirtyLayer]->markDirty();
                 }
             }