mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 09:56:30 +00:00
ACCESS: Manually implement ASurface::copyFrom for performance
The original called Surface::copyFrom, which keeps recreating the dest surface with each copy. This version simply copies the image
This commit is contained in:
parent
95aa9a13a6
commit
93bbe3a45e
@ -252,7 +252,11 @@ void ASurface::transCopyFrom(ASurface &src) {
|
||||
}
|
||||
|
||||
void ASurface::copyFrom(Graphics::Surface &src) {
|
||||
Graphics::Surface::copyFrom(src);
|
||||
for (int y = 0; y < src.h; ++y) {
|
||||
const byte *srcP = (const byte *)src.getBasePtr(0, y);
|
||||
byte *destP = (byte *)getBasePtr(0, y);
|
||||
Common::copy(srcP, srcP + src.w, destP);
|
||||
}
|
||||
}
|
||||
|
||||
void ASurface::copyBuffer(Graphics::Surface *src) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user