mirror of https://github.com/mgba-emu/mgba.git
GBA Video: Slight optimizations
This commit is contained in:
parent
be97f04971
commit
24f0be2862
|
@ -41,10 +41,12 @@
|
|||
x += background->dx; \
|
||||
y += background->dy; \
|
||||
\
|
||||
MOSAIC(COORD) \
|
||||
\
|
||||
uint32_t current = *pixel; \
|
||||
if (pixelData && IS_WRITABLE(current)) { \
|
||||
if (!IS_WRITABLE(current)) { \
|
||||
continue; \
|
||||
} \
|
||||
MOSAIC(COORD) \
|
||||
if (pixelData) { \
|
||||
COMPOSITE_256_ ## OBJWIN (BLEND); \
|
||||
} \
|
||||
}
|
||||
|
|
|
@ -517,6 +517,12 @@ static void GBAVideoSoftwareRendererDrawScanline(struct GBAVideoRenderer* render
|
|||
backdrop |= softwareRenderer->variantPalette[0];
|
||||
}
|
||||
int end = softwareRenderer->windows[w].endX;
|
||||
for (; x < end - 3; x += 4) {
|
||||
softwareRenderer->row[x] = backdrop;
|
||||
softwareRenderer->row[x + 1] = backdrop;
|
||||
softwareRenderer->row[x + 2] = backdrop;
|
||||
softwareRenderer->row[x + 3] = backdrop;
|
||||
}
|
||||
for (; x < end; ++x) {
|
||||
softwareRenderer->row[x] = backdrop;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue