Pass pack state arguments instead of split parameters.

Similar to unpack state, the PixelPackState struct encapsulates
all the parameters related to pixel pack buffers. Passing the
packstate makes functions more consise.

BUG=angle:511

Change-Id: If6954a5085e9b8f828cfc8892a73e7c7514b0c8a
Reviewed-on: https://chromium-review.googlesource.com/191032
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp
index 4edf933..651cf35 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -2944,9 +2944,9 @@
 
     bool isSized = IsSizedInternalFormat(format, mClientVersion);
     GLenum sizedInternalFormat = (isSized ? format : GetSizedInternalFormat(format, type, mClientVersion));
-    GLuint outputPitch = GetRowPitch(sizedInternalFormat, type, mClientVersion, width, getPackAlignment());
+    GLuint outputPitch = GetRowPitch(sizedInternalFormat, type, mClientVersion, width, mState.pack.alignment);
 
-    mRenderer->readPixels(framebuffer, x, y, width, height, format, type, outputPitch, getPackReverseRowOrder(), getPackAlignment(), pixels);
+    mRenderer->readPixels(framebuffer, x, y, width, height, format, type, outputPitch, mState.pack, pixels);
 }
 
 void Context::drawArrays(GLenum mode, GLint first, GLsizei count, GLsizei instances)