diff options
author | Peter Kohaut | 2019-09-04 17:22:35 +0200 |
---|---|---|
committer | Peter Kohaut | 2019-09-04 17:59:29 +0200 |
commit | 4355c42044493249cfc2562e190e66f7226a4829 (patch) | |
tree | 5a961a26b2e1da65e4093946e2ab87c02158426d /engines/bladerunner/vqa_decoder.cpp | |
parent | a7e30d0e7f62aad9aceadd674f1b51146f20958d (diff) | |
download | scummvm-rg350-4355c42044493249cfc2562e190e66f7226a4829.tar.gz scummvm-rg350-4355c42044493249cfc2562e190e66f7226a4829.tar.bz2 scummvm-rg350-4355c42044493249cfc2562e190e66f7226a4829.zip |
BLADERUNNER: Performance fixes
Pixel format functions and CLIP functions are too slow in debug builds,
replacing them with static code makes debug builds faster.
Diffstat (limited to 'engines/bladerunner/vqa_decoder.cpp')
-rw-r--r-- | engines/bladerunner/vqa_decoder.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/bladerunner/vqa_decoder.cpp b/engines/bladerunner/vqa_decoder.cpp index d3250577c2..769a314f82 100644 --- a/engines/bladerunner/vqa_decoder.cpp +++ b/engines/bladerunner/vqa_decoder.cpp @@ -834,10 +834,12 @@ void VQADecoder::VQAVideoTrack::VPTRWriteBlock(Graphics::Surface *surface, unsig src_p += 2; uint8 a, r, g, b; - gameDataPixelFormat().colorToARGB(vqaColor, a, r, g, b); + getGameDataColor(vqaColor, a, r, g, b); if (!(alpha && a)) { - void* dstPtr = surface->getBasePtr(CLIP(dst_x + x, (uint32)0, (uint32)(surface->w - 1)), CLIP(dst_y + y, (uint32)0, (uint32)(surface->h - 1))); + // clip is too slow and it is not needed + // void* dstPtr = surface->getBasePtr(CLIP(dst_x + x, (uint32)0, (uint32)(surface->w - 1)), CLIP(dst_y + y, (uint32)0, (uint32)(surface->h - 1))); + void* dstPtr = surface->getBasePtr(dst_x + x, dst_y + y); // Ignore the alpha in the output as it is inversed in the input drawPixel(*surface, dstPtr, surface->format.RGBToColor(r, g, b)); } |