aboutsummaryrefslogtreecommitdiff
path: root/graphics/managed_surface.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-11-23 19:51:44 -0500
committerPaul Gilbert2016-11-23 19:51:44 -0500
commit982c8f4eeb132f2e20ff9af1d71b0f3de6477bb5 (patch)
tree10f92b68c72befa8299438020ab5dceb293eb076 /graphics/managed_surface.cpp
parentdd7525320f7778c0760cbae41647e90d419d7843 (diff)
downloadscummvm-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/managed_surface.cpp')
-rw-r--r--graphics/managed_surface.cpp4
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,