mirror of https://github.com/mgba-emu/mgba.git
Small, trivial optimizations in GBAVideoSoftwareRendererDrawScanline
This commit is contained in:
parent
6eafbc6331
commit
17ccb35c33
|
@ -372,7 +372,8 @@ static void GBAVideoSoftwareRendererDrawScanline(struct GBAVideoRenderer* render
|
||||||
} else {
|
} else {
|
||||||
backdrop |= softwareRenderer->variantPalette[0];
|
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;
|
softwareRenderer->row[x] = backdrop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -388,7 +389,8 @@ static void GBAVideoSoftwareRendererDrawScanline(struct GBAVideoRenderer* render
|
||||||
} else {
|
} else {
|
||||||
backdrop |= softwareRenderer->variantPalette[0];
|
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];
|
uint32_t color = softwareRenderer->row[x];
|
||||||
if (color & FLAG_TARGET_1 && !(color & FLAG_FINALIZED)) {
|
if (color & FLAG_TARGET_1 && !(color & FLAG_FINALIZED)) {
|
||||||
softwareRenderer->row[x] = _mix(softwareRenderer->bldb, backdrop, softwareRenderer->blda, color);
|
softwareRenderer->row[x] = _mix(softwareRenderer->bldb, backdrop, softwareRenderer->blda, color);
|
||||||
|
|
Loading…
Reference in New Issue