diff options
author | Paul Gilbert | 2014-12-18 21:52:59 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-12-18 21:52:59 -0500 |
commit | 93bbe3a45e4d9a6542b93ec9747bc0c6031054ae (patch) | |
tree | d0b6083fb28b8fa35b843a05ffdcd40ee0ae1988 /engines/access | |
parent | 95aa9a13a6ca634af664a3ac4753faf8b8271fd9 (diff) | |
download | scummvm-rg350-93bbe3a45e4d9a6542b93ec9747bc0c6031054ae.tar.gz scummvm-rg350-93bbe3a45e4d9a6542b93ec9747bc0c6031054ae.tar.bz2 scummvm-rg350-93bbe3a45e4d9a6542b93ec9747bc0c6031054ae.zip |
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
Diffstat (limited to 'engines/access')
-rw-r--r-- | engines/access/asurface.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/access/asurface.cpp b/engines/access/asurface.cpp index 27e73a0640..38af7add00 100644 --- a/engines/access/asurface.cpp +++ b/engines/access/asurface.cpp @@ -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) { |