Closed mshin-wolvic closed 1 year ago
Is there any way to avoid swapping an empty frame when the frame is not ready?
I think it would be possible to make sure that Wolvic doesn't swap after the frame's cancellation. @svillar , wdyt?
Is there any way to avoid swapping an empty frame when the frame is not ready?
I think it would be possible to make sure that Wolvic doesn't swap after the frame's cancellation. @svillar , wdyt?
I didn't have time to look into that, but is it blocking anything? I thought it was a leak, which is indeed important, but was not aware that it could cause any other problem
Fixed the white flashing issue When sharing textures, the following order should be ensured.
Wolvic accesses the last texture every tick(=vsync) even if we don't set the next frame id. Then, it can cause to update/release of texture in Wolvic when the browser is processing the texture on another thread, which can be broken the above sequence. This will cause the empty buffer frame in texture and occur a white flashing issue.
Reset the texture name as zero after finishing the frame to avoid the racing between processing the texture in chromium and consuming it in Wolvic.
Fixed no frame issue when reaching a maximum value of frame ID Chromium has a maximum value of frame ID of 255(uint8), and when recycling frame id to zero, processing the frame gets stuck.
Reduced the time-out value to 10ms If the texture conflicts, the callback could not be called in time. We reduce the timer's time so that the next frame is handled shortly.