Commit 1f876121 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Only update the screen when the frontbuffer was changed.

There is no need to copy the frontbuffer to the screen when the backbuffer was modified...
parent b3f967a0
...@@ -199,7 +199,10 @@ IWineGDISurfaceImpl_UnlockRect(IWineD3DSurface *iface) ...@@ -199,7 +199,10 @@ IWineGDISurfaceImpl_UnlockRect(IWineD3DSurface *iface)
/* Tell the swapchain to update the screen */ /* Tell the swapchain to update the screen */
if (SUCCEEDED(IWineD3DSurface_GetContainer(iface, &IID_IWineD3DSwapChain, (void **)&swapchain))) if (SUCCEEDED(IWineD3DSurface_GetContainer(iface, &IID_IWineD3DSwapChain, (void **)&swapchain)))
{ {
if(iface == swapchain->frontBuffer)
{
x11_copy_to_screen(swapchain, &This->lockedRect); x11_copy_to_screen(swapchain, &This->lockedRect);
}
IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain); IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain);
} }
...@@ -490,7 +493,10 @@ static HRESULT WINAPI IWineGDISurfaceImpl_RealizePalette(IWineD3DSurface *iface) ...@@ -490,7 +493,10 @@ static HRESULT WINAPI IWineGDISurfaceImpl_RealizePalette(IWineD3DSurface *iface)
/* Tell the swapchain to update the screen */ /* Tell the swapchain to update the screen */
if (SUCCEEDED(IWineD3DSurface_GetContainer(iface, &IID_IWineD3DSwapChain, (void **)&swapchain))) if (SUCCEEDED(IWineD3DSurface_GetContainer(iface, &IID_IWineD3DSwapChain, (void **)&swapchain)))
{ {
if(iface == swapchain->frontBuffer)
{
x11_copy_to_screen(swapchain, NULL); x11_copy_to_screen(swapchain, NULL);
}
IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain); IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment