Use explicit stride for framebuffer blit.

Change-Id: I68685932934caba4d9fab7b45014d24316ce45a8
Reviewed-on: https://swiftshader-review.googlesource.com/4293
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
diff --git a/src/Main/FrameBuffer.cpp b/src/Main/FrameBuffer.cpp
index 2492d26..15e7e4d 100644
--- a/src/Main/FrameBuffer.cpp
+++ b/src/Main/FrameBuffer.cpp
@@ -150,7 +150,7 @@
 		cursorPositionY = y;
 	}
 
-	void FrameBuffer::copy(void *source, Format format)
+	void FrameBuffer::copy(void *source, Format format, size_t stride)
 	{
 		if(!source)
 		{
@@ -170,11 +170,7 @@
 		}
 		else
 		{
-			const int width2 = (width + 1) & ~1;
-			const int sBytes = Surface::bytes(sourceFormat);
-			const int sStride = sBytes * width2;
-
-			target = (byte*)source + (height - 1) * sStride;
+			target = (byte*)source + (height - 1) * stride;
 		}
 
 		cursorX = cursorPositionX - cursorHotspotX;