Small, trivial optimizations in GBAVideoSoftwareRendererDrawScanline
Jeffrey Pfau jeffrey@endrift.com
Thu, 24 Oct 2013 00:54:51 -0700
1 files changed,
4 insertions(+),
2 deletions(-)
M
src/gba/renderers/video-software.c
→
src/gba/renderers/video-software.c
@@ -372,7 +372,8 @@ backdrop |= softwareRenderer->normalPalette[0];
} else { backdrop |= softwareRenderer->variantPalette[0]; } - for (; x < softwareRenderer->windows[w].endX; ++x) { + int end = softwareRenderer->windows[w].endX; + for (; x < end; ++x) { softwareRenderer->row[x] = backdrop; } }@@ -388,7 +389,8 @@ backdrop |= softwareRenderer->normalPalette[0];
} else { backdrop |= softwareRenderer->variantPalette[0]; } - for (; x < softwareRenderer->windows[w].endX; ++x) { + int end = softwareRenderer->windows[w].endX; + for (; x < end; ++x) { uint32_t color = softwareRenderer->row[x]; if (color & FLAG_TARGET_1 && !(color & FLAG_FINALIZED)) { softwareRenderer->row[x] = _mix(softwareRenderer->bldb, backdrop, softwareRenderer->blda, color);