diff options
author | Paul Gilbert | 2016-11-23 19:51:44 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-11-23 19:51:44 -0500 |
commit | 982c8f4eeb132f2e20ff9af1d71b0f3de6477bb5 (patch) | |
tree | 10f92b68c72befa8299438020ab5dceb293eb076 /graphics | |
parent | dd7525320f7778c0760cbae41647e90d419d7843 (diff) | |
download | scummvm-rg350-982c8f4eeb132f2e20ff9af1d71b0f3de6477bb5.tar.gz scummvm-rg350-982c8f4eeb132f2e20ff9af1d71b0f3de6477bb5.tar.bz2 scummvm-rg350-982c8f4eeb132f2e20ff9af1d71b0f3de6477bb5.zip |
GRAPHICS: Allow 32-bit fast blitting when formats match in ManagedSurface
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/managed_surface.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/graphics/managed_surface.cpp b/graphics/managed_surface.cpp index 0b29b1937f..e2d87b654f 100644 --- a/graphics/managed_surface.cpp +++ b/graphics/managed_surface.cpp @@ -185,8 +185,8 @@ void ManagedSurface::blitFrom(const Surface &src, const Common::Rect &srcRect, const byte *srcP = (const byte *)src.getBasePtr(srcBounds.left, srcBounds.top + y); byte *destP = (byte *)getBasePtr(destBounds.left, destBounds.top + y); - if (src.format == format && format.bytesPerPixel <= 2) { - // Matching 8-bit or 16-bit surfaces (no alpha), so we can do a straight copy + if (src.format == format) { + // Matching surface formats, so we can do a straight copy Common::copy(srcP, srcP + srcBounds.width() * format.bytesPerPixel, destP); } else { for (int x = 0; x < srcBounds.width(); ++x, |