Small, trivial optimizations in GBAVideoSoftwareRendererDrawScanline

This commit is contained in:
Jeffrey Pfau 2013-10-24 00:54:51 -07:00
parent 6eafbc6331
commit 17ccb35c33
1 changed files with 4 additions and 2 deletions

View File

@ -372,7 +372,8 @@ static void GBAVideoSoftwareRendererDrawScanline(struct GBAVideoRenderer* render
} 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 @@ static void GBAVideoSoftwareRendererDrawScanline(struct GBAVideoRenderer* render
} 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);