From 982c8f4eeb132f2e20ff9af1d71b0f3de6477bb5 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 23 Nov 2016 19:51:44 -0500 Subject: GRAPHICS: Allow 32-bit fast blitting when formats match in ManagedSurface --- graphics/managed_surface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'graphics/managed_surface.cpp') 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, -- cgit v1.2.3