rosalina screenshots: improve conversion time by another 10%
This commit is contained in:
parent
037fae99d6
commit
2834bae318
@ -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)
|
||||
{
|
||||
|
@ -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));
|
||||
|
Reference in New Issue
Block a user