[Spice-devel] [PATCH 7/7] Remove unused surfaces_used

alexl at redhat.com alexl at redhat.com
Tue Aug 24 01:41:14 PDT 2010


From: Alexander Larsson <alexl at redhat.com>

---
 display/qxldd.h |    1 -
 display/res.c   |   12 +-----------
 2 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/display/qxldd.h b/display/qxldd.h
index 2cb2db4..82886a9 100644
--- a/display/qxldd.h
+++ b/display/qxldd.h
@@ -198,7 +198,6 @@ typedef struct DevRes {
 
     SurfaceInfo *surfaces_info;
     SurfaceInfo *free_surfaces;
-    UINT8 *surfaces_used;
 
     HANDLE driver;
 #ifdef DBG
diff --git a/display/res.c b/display/res.c
index e20dc96..d466ce7 100644
--- a/display/res.c
+++ b/display/res.c
@@ -377,10 +377,6 @@ void CleanGlobalRes()
                 EngFreeMem(global_res[i].dynamic);
                 global_res[i].dynamic = NULL;
             }
-            if (global_res[i].surfaces_used) {
-                EngFreeMem(global_res[i].surfaces_used);
-                global_res[i].surfaces_used = NULL;
-            }
             if (global_res[i].surfaces_info) {
                 EngFreeMem(global_res[i].surfaces_info);
                 global_res[i].surfaces_info = NULL;
@@ -425,13 +421,7 @@ static void InitRes(PDev *pdev)
         PANIC(pdev, "Res dynamic allocation failed\n");
     }
 
-    pdev->Res.surfaces_used = EngAllocMem(FL_ZERO_MEMORY, sizeof(UINT8) * pdev->n_surfaces,
-                                          ALLOC_TAG);
-    if (!pdev->Res.surfaces_used) {
-        PANIC(pdev, "Res surfaces_used allocation failed\n");
-    }
-
-    pdev->Res.surfaces_info = (SurfaceInfo *)EngAllocMem(FL_ZERO_MEMORY,
+   pdev->Res.surfaces_info = (SurfaceInfo *)EngAllocMem(FL_ZERO_MEMORY,
 							 sizeof(SurfaceInfo) * pdev->n_surfaces, 
 							 ALLOC_TAG);
     if (!pdev->Res.surfaces_info) {
-- 
1.7.2.1



More information about the Spice-devel mailing list