rosalina screenshots: improve conversion time by another 10%

This commit is contained in:
TuxSH 2020-05-08 20:51:41 +01:00
parent 037fae99d6
commit 2834bae318
2 changed files with 4 additions and 1 deletions

View File

@ -333,9 +333,12 @@ static void Draw_ConvertFrameBufferLinesKernel(const FrameBufferConvertArgs *arg
for (u32 y = args->startingLine; y < args->startingLine + args->numLines; y++)
{
for(u32 x = 0; x < width; x++)
{
__builtin_prefetch(addr + x * stride + y * formatSizes[fmt], 0, 3);
Draw_ConvertPixelToBGR8(args->buf + (x + width * y) * 3 , addr + x * stride + y * formatSizes[fmt], fmt);
}
}
}
void Draw_ConvertFrameBufferLines(u8 *buf, u32 startingLine, u32 numLines, bool top, bool left)
{

View File

@ -279,7 +279,7 @@ void RosalinaMenu_TakeScreenshot(void)
TRY(RosalinaMenu_WriteScreenshot(&file, false, true));
TRY(IFile_Close(&file));
if(false && (GPU_FB_TOP_FMT & 0x20) && (Draw_GetCurrentFramebufferAddress(true, true) != Draw_GetCurrentFramebufferAddress(true, false)))
if((GPU_FB_TOP_FMT & 0x20) && (Draw_GetCurrentFramebufferAddress(true, true) != Draw_GetCurrentFramebufferAddress(true, false)))
{
sprintf(filename, "/luma/screenshots/%04lu-%02lu-%02lu_%02lu-%02lu-%02lu.%03llu_top_right.bmp", year, month, days, hours, minutes, seconds, milliseconds);
TRY(IFile_Open(&file, archiveId, fsMakePath(PATH_EMPTY, ""), fsMakePath(PATH_ASCII, filename), FS_OPEN_CREATE | FS_OPEN_WRITE));