Split pixelBuffer from pack/unpack state

This will refactor will help use packed enums for buffer targets.

BUG=angleproject:2169

Change-Id: Ie7ed3e105f89457c67027e6598d7e29503ad355c
Reviewed-on: https://chromium-review.googlesource.com/745181
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/renderer/renderer_utils.cpp b/src/libANGLE/renderer/renderer_utils.cpp
index eb78ecd..55471c1 100644
--- a/src/libANGLE/renderer/renderer_utils.cpp
+++ b/src/libANGLE/renderer/renderer_utils.cpp
@@ -237,27 +237,18 @@
                                    GLenum typeIn,
                                    GLuint outputPitchIn,
                                    const gl::PixelPackState &packIn,
+                                   gl::Buffer *packBufferIn,
                                    ptrdiff_t offsetIn)
     : area(areaIn),
       format(formatIn),
       type(typeIn),
       outputPitch(outputPitchIn),
-      packBuffer(packIn.pixelBuffer.get()),
-      pack(packIn.alignment, packIn.reverseRowOrder),
+      packBuffer(packBufferIn),
+      pack(),
       offset(offsetIn)
 {
-}
-
-PackPixelsParams::PackPixelsParams(const gl::Context *context, const PackPixelsParams &other)
-    : area(other.area),
-      format(other.format),
-      type(other.type),
-      outputPitch(other.outputPitch),
-      packBuffer(other.packBuffer),
-      pack(),
-      offset(other.offset)
-{
-    pack.copyFrom(context, other.pack);
+    pack.alignment       = packIn.alignment;
+    pack.reverseRowOrder = packIn.reverseRowOrder;
 }
 
 void PackPixels(const PackPixelsParams &params,
@@ -509,7 +500,8 @@
 
     const GLubyte color[] = {0, 0, 0, 255};
     const gl::Extents colorSize(1, 1, 1);
-    const gl::PixelUnpackState unpack(1, 0);
+    gl::PixelUnpackState unpack;
+    unpack.alignment = 1;
     const gl::Box area(0, 0, 0, 1, 1, 1);
 
     // If a texture is external use a 2D texture for the incomplete texture