Move fast copy functions into angle::Format.
These tables were duplicated in D3D11 and D3D9, and would have to be
further duplicated into Vulkan.
BUG=angleproject:1455
Change-Id: Ice1b81417d7b14f933b61861c4a9997c260ef72e
Reviewed-on: https://chromium-review.googlesource.com/367690
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/renderer_utils.cpp b/src/libANGLE/renderer/renderer_utils.cpp
index fad6d6b..b93a1ff 100644
--- a/src/libANGLE/renderer/renderer_utils.cpp
+++ b/src/libANGLE/renderer/renderer_utils.cpp
@@ -172,7 +172,6 @@
void PackPixels(const PackPixelsParams ¶ms,
const angle::Format &sourceFormat,
- const FastCopyFunctionMap &fastCopyFunctionsMap,
int inputPitchIn,
const uint8_t *sourceIn,
uint8_t *destWithoutOffset)
@@ -204,7 +203,8 @@
ASSERT(sourceGLInfo.pixelBytes > 0);
gl::FormatType formatType(params.format, params.type);
- ColorCopyFunction fastCopyFunc = GetFastCopyFunction(fastCopyFunctionsMap, formatType);
+ ColorCopyFunction fastCopyFunc =
+ GetFastCopyFunction(sourceFormat.fastCopyFunctions, formatType);
GLenum sizedDestInternalFormat = gl::GetSizedInternalFormat(formatType.format, formatType.type);
const auto &destFormatInfo = gl::GetInternalFormatInfo(sizedDestInternalFormat);