Stefan Dösinger : wined3d: Only update the screen when the frontbuffer was changed.

Alexandre Julliard julliard at winehq.org
Mon Jun 29 09:17:40 CDT 2009


Module: wine
Branch: master
Commit: 1f8761219b99cec6369f9267c3611587100e2fa2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1f8761219b99cec6369f9267c3611587100e2fa2

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Sat Jun 27 21:35:24 2009 +0200

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...

---

 dlls/wined3d/surface_gdi.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/surface_gdi.c b/dlls/wined3d/surface_gdi.c
index 96054d9..9e1a5de 100644
--- a/dlls/wined3d/surface_gdi.c
+++ b/dlls/wined3d/surface_gdi.c
@@ -199,7 +199,10 @@ IWineGDISurfaceImpl_UnlockRect(IWineD3DSurface *iface)
     /* Tell the swapchain to update the screen */
     if (SUCCEEDED(IWineD3DSurface_GetContainer(iface, &IID_IWineD3DSwapChain, (void **)&swapchain)))
     {
-        x11_copy_to_screen(swapchain, &This->lockedRect);
+        if(iface == swapchain->frontBuffer)
+        {
+            x11_copy_to_screen(swapchain, &This->lockedRect);
+        }
         IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain);
     }
 
@@ -490,7 +493,10 @@ static HRESULT WINAPI IWineGDISurfaceImpl_RealizePalette(IWineD3DSurface *iface)
     /* Tell the swapchain to update the screen */
     if (SUCCEEDED(IWineD3DSurface_GetContainer(iface, &IID_IWineD3DSwapChain, (void **)&swapchain)))
     {
-        x11_copy_to_screen(swapchain, NULL);
+        if(iface == swapchain->frontBuffer)
+        {
+            x11_copy_to_screen(swapchain, NULL);
+        }
         IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain);
     }
 




More information about the wine-cvs mailing list