Refactor FrameBuffer blit/flip source.
Pass a surface to the blit/flip functions, instead of a raw pointer.
This puts the FrameBuffer in control of locking and unlocking.
Change-Id: I55335b3beef8d7083aae7687bd25392964261bde
Reviewed-on: https://swiftshader-review.googlesource.com/4482
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Main/FrameBufferX11.cpp b/src/Main/FrameBufferX11.cpp
index 2e50f42..ca0bb4b 100644
--- a/src/Main/FrameBufferX11.cpp
+++ b/src/Main/FrameBufferX11.cpp
@@ -130,9 +130,9 @@
framebuffer = nullptr;
}
- void FrameBufferX11::blit(void *source, const Rect *sourceRect, const Rect *destRect, Format sourceFormat, size_t sourceStride)
+ void FrameBufferX11::blit(sw::Surface *source, const Rect *sourceRect, const Rect *destRect)
{
- copy(source, sourceFormat, sourceStride);
+ copy(source);
if(!mit_shm)
{