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/FramebufferVk.cpp b/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
index f94d96a..5b672d3 100644
--- a/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
+++ b/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
@@ -344,13 +344,10 @@
     outputSkipBytes += (clippedArea.x - area.x) * sizedFormatInfo.pixelBytes +
                        (clippedArea.y - area.y) * outputPitch;
 
-    PackPixelsParams params;
-    params.area        = flippedArea;
-    params.format      = format;
-    params.type        = type;
-    params.outputPitch = outputPitch;
-    params.packBuffer  = glState.getTargetBuffer(gl::BufferBinding::PixelPack);
-    params.pack        = packState;
+    const angle::Format &angleFormat = GetFormatFromFormatType(format, type);
+
+    PackPixelsParams params(flippedArea, angleFormat, outputPitch, packState,
+                            glState.getTargetBuffer(gl::BufferBinding::PixelPack), 0);
 
     ANGLE_TRY(readPixelsImpl(contextVk, flippedArea, params, VK_IMAGE_ASPECT_COLOR_BIT,
                              getColorReadRenderTarget(),
@@ -408,8 +405,6 @@
     vk::ImageHelper *imageForRead = readRenderTarget->getImageForRead(
         this, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, commandBuffer);
     const angle::Format &drawFormat = drawRenderTarget->getImageFormat().angleFormat();
-    const gl::InternalFormat &sizedInternalDrawFormat =
-        gl::GetSizedInternalFormatInfo(drawFormat.glInternalFormat);
 
     GLuint outputPitch = 0;
 
@@ -429,8 +424,7 @@
     PackPixelsParams packPixelsParams;
     packPixelsParams.pack.alignment       = 1;
     packPixelsParams.pack.reverseRowOrder = true;
-    packPixelsParams.type                 = sizedInternalDrawFormat.type;
-    packPixelsParams.format               = sizedInternalDrawFormat.format;
+    packPixelsParams.destFormat           = &drawFormat;
     packPixelsParams.area.height          = copyArea.height;
     packPixelsParams.area.width           = copyArea.width;
     packPixelsParams.area.x               = copyArea.x;