Make PackPixels take an angle::Format.

This removes the format type parameter from places where it isn't
needed. It also removes the 'write color' functions map. This map was
redundant with the angle::Format write function.

Bug: angleproject:2729
Change-Id: I24e4548a89342237d7ed25180fea156fba51ccab
Reviewed-on: https://chromium-review.googlesource.com/1142300
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/TextureVk.cpp b/src/libANGLE/renderer/vulkan/TextureVk.cpp
index 30fc1d4..91658e2 100644
--- a/src/libANGLE/renderer/vulkan/TextureVk.cpp
+++ b/src/libANGLE/renderer/vulkan/TextureVk.cpp
@@ -215,13 +215,10 @@
         pixelPackState.reverseRowOrder = !pixelPackState.reverseRowOrder;
     }
 
-    PackPixelsParams params;
-    params.area        = clippedRectangle;
-    params.format      = formatInfo.format;
-    params.type        = formatInfo.type;
-    params.outputPitch = static_cast<GLuint>(outputRowPitch);
-    params.packBuffer  = nullptr;
-    params.pack        = pixelPackState;
+    const angle::Format &copyFormat =
+        GetFormatFromFormatType(formatInfo.internalFormat, formatInfo.type);
+    PackPixelsParams params(clippedRectangle, copyFormat, static_cast<GLuint>(outputRowPitch),
+                            pixelPackState, nullptr, 0);
 
     // 2- copy the source image region to the pixel buffer using a cpu readback
     if (loadFunction.requiresConversion)