mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 21:58:48 +00:00
Video Common: Avoid 'presenting' duplicate frames by detecting when swap
hasn't changed since the last frame
This commit is contained in:
parent
c58010404d
commit
e6d85b0915
4 changed files with 6 additions and 3 deletions
|
@ -639,11 +639,10 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, const
|
|||
auto* xfb_entry = g_texture_cache->GetTexture(xfbAddr, fbWidth, fbHeight, TextureFormat::XFB,
|
||||
force_safe_texture_cache_hash);
|
||||
|
||||
if (xfb_entry)
|
||||
if (xfb_entry && xfb_entry->id != m_last_xfb_id)
|
||||
{
|
||||
// TODO, check if xfb_entry is a duplicate of the previous frame and skip SwapImpl
|
||||
|
||||
m_last_xfb_texture = xfb_entry->texture.get();
|
||||
m_last_xfb_id = xfb_entry->id;
|
||||
|
||||
// TODO: merge more generic parts into VideoCommon
|
||||
g_renderer->SwapImpl(xfb_entry->texture.get(), rc, ticks, xfb_entry->gamma);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue