Refactor Texture::copy*Image methods to use gl::Error objects.

BUG=angle:520

Change-Id: I8b6bf5d50ee0d1f796eff52919ee65823fdee6cb
Reviewed-on: https://chromium-review.googlesource.com/216647
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libGLESv2/Texture.cpp b/src/libGLESv2/Texture.cpp
index e7331c2..0beac55 100644
--- a/src/libGLESv2/Texture.cpp
+++ b/src/libGLESv2/Texture.cpp
@@ -148,9 +148,10 @@
     getImplementation()->generateMipmaps();
 }
 
-void Texture::copySubImage(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height, Framebuffer *source)
+Error Texture::copySubImage(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
+                           GLint x, GLint y, GLsizei width, GLsizei height, Framebuffer *source)
 {
-    getImplementation()->copySubImage(target, level, xoffset, yoffset, zoffset, x, y, width, height, source);
+    return mTexture->copySubImage(target, level, xoffset, yoffset, zoffset, x, y, width, height, source);
 }
 
 unsigned int Texture::getTextureSerial()
@@ -273,11 +274,12 @@
     return mTexture->subImageCompressed(GL_TEXTURE_2D, level, xoffset, yoffset, 0, width, height, 1, format, imageSize, pixels);
 }
 
-void Texture2D::copyImage(GLint level, GLenum format, GLint x, GLint y, GLsizei width, GLsizei height, Framebuffer *source)
+Error Texture2D::copyImage(GLint level, GLenum format, GLint x, GLint y, GLsizei width, GLsizei height,
+                           Framebuffer *source)
 {
     releaseTexImage();
 
-    mTexture->copyImage(GL_TEXTURE_2D, level, format, x, y, width, height, source);
+    return mTexture->copyImage(GL_TEXTURE_2D, level, format, x, y, width, height, source);
 }
 
 void Texture2D::storage(GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
@@ -529,9 +531,10 @@
     return GetInternalFormatInfo(getInternalFormat(target, level)).depthBits > 0;
 }
 
-void TextureCubeMap::copyImage(GLenum target, GLint level, GLenum format, GLint x, GLint y, GLsizei width, GLsizei height, Framebuffer *source)
+Error TextureCubeMap::copyImage(GLenum target, GLint level, GLenum format, GLint x, GLint y,
+                                GLsizei width, GLsizei height, Framebuffer *source)
 {
-    mTexture->copyImage(target, level, format, x, y, width, height, source);
+    return mTexture->copyImage(target, level, format, x, y, width, height, source);
 }
 
 void TextureCubeMap::storage(GLsizei levels, GLenum internalformat, GLsizei size)