rosalina screenshots: improve conversion time by another 10%
This commit is contained in:
parent
037fae99d6
commit
2834bae318
@ -333,7 +333,10 @@ static void Draw_ConvertFrameBufferLinesKernel(const FrameBufferConvertArgs *arg
|
|||||||
for (u32 y = args->startingLine; y < args->startingLine + args->numLines; y++)
|
for (u32 y = args->startingLine; y < args->startingLine + args->numLines; y++)
|
||||||
{
|
{
|
||||||
for(u32 x = 0; x < width; x++)
|
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);
|
Draw_ConvertPixelToBGR8(args->buf + (x + width * y) * 3 , addr + x * stride + y * formatSizes[fmt], fmt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ void RosalinaMenu_TakeScreenshot(void)
|
|||||||
TRY(RosalinaMenu_WriteScreenshot(&file, false, true));
|
TRY(RosalinaMenu_WriteScreenshot(&file, false, true));
|
||||||
TRY(IFile_Close(&file));
|
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);
|
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));
|
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