Commit 03e91f29 by Alexis Hetu Committed by Alexis Hétu

Removed useless memcpy operations

Loading RGBA8 was apparently copying each line "width" times, which is pretty bad. Fixed that by removing the useless loop. Change-Id: Icf38232e422eb33f77b9df499e4137ea8f53abd3 Reviewed-on: https://swiftshader-review.googlesource.com/3040Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 52114cc5
...@@ -227,13 +227,7 @@ namespace ...@@ -227,13 +227,7 @@ namespace
template<> template<>
void LoadImageRow<UByte4>(const unsigned char *source, unsigned char *dest, GLint xoffset, GLsizei width) void LoadImageRow<UByte4>(const unsigned char *source, unsigned char *dest, GLint xoffset, GLsizei width)
{ {
const unsigned int *sourceI = reinterpret_cast<const unsigned int*>(source); memcpy(dest + xoffset * 4, source, width * 4);
unsigned int *destI = reinterpret_cast<unsigned int*>(dest + xoffset * 4);
for(int x = 0; x < width; x++)
{
memcpy(dest + xoffset * 4, source, width * 4);
}
} }
template<> template<>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment