[Spice-devel] [spice-protocol PATCH 26/46] qxlhw: qxl_surface: remove last user of qxl_garbage_collect
Alon Levy
alevy at redhat.com
Tue Apr 10 04:50:22 PDT 2012
qxlhw_surface_alloc will do it anyway.
---
src/qxl_surface.c | 5 +----
src/qxlhw_pci.c | 8 ++------
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/src/qxl_surface.c b/src/qxl_surface.c
index 6a6242e..0b8c884 100644
--- a/src/qxl_surface.c
+++ b/src/qxl_surface.c
@@ -521,7 +521,6 @@ surface_send_create (surface_cache_t *cache,
stride = width * PIXMAN_FORMAT_BPP (pformat) / 8;
stride = (stride + 3) & ~3;
- qxl_garbage_collect (qxl);
address = qxlhw_surface_alloc (qxl->hw, width, height, bpp, stride, pformat);
retry:
@@ -1167,9 +1166,7 @@ qxl_surface_copy (qxl_surface_t *dest,
}
else
{
- struct qxlhw_mem image_mem = qxlhw_data_alloc (qxl->hw, sizeof *image);
-
- image = image_mem.addr;
+ image = qxlhw_data_alloc (qxl->hw, sizeof *image);
dest->u.copy_src->ref_count++;
diff --git a/src/qxlhw_pci.c b/src/qxlhw_pci.c
index f8059be..84af649 100644
--- a/src/qxlhw_pci.c
+++ b/src/qxlhw_pci.c
@@ -768,7 +768,6 @@ qxlhw_pci_image_alloc(struct qxlhw *base, const uint8_t *data,
{
struct qxlhw_pci *hw = (struct qxlhw_pci *)base;
struct QXLImage *image;
- struct qxlhw_mem image_mem;
struct QXLDataChunk *head;
struct QXLDataChunk *tail;
int dest_stride = width * Bpp;
@@ -788,11 +787,9 @@ qxlhw_pci_image_alloc(struct qxlhw *base, const uint8_t *data,
{
int chunk_size = MAX (512 * 512, dest_stride);
int n_lines = MIN ((chunk_size / dest_stride), h);
- QXLDataChunk *chunk;
- struct qxlhw_mem chunk_mem =
+ QXLDataChunk *chunk =
qxlhw_data_alloc (base, sizeof *chunk + n_lines * dest_stride);
- chunk = chunk_mem.addr;
chunk->data_size = n_lines * dest_stride;
*hash = hash_and_copy (data, stride,
chunk->data, dest_stride,
@@ -818,8 +815,7 @@ qxlhw_pci_image_alloc(struct qxlhw *base, const uint8_t *data,
}
/* Image */
- image_mem = qxlhw_data_alloc (base, sizeof *image);
- image = image_mem.addr;
+ image = qxlhw_data_alloc (base, sizeof *image);
image->descriptor.id = 0;
image->descriptor.type = SPICE_IMAGE_TYPE_BITMAP;
--
1.7.9.3
More information about the Spice-devel
mailing list