diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2012-03-14 12:38:03 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2012-03-14 12:49:42 -0400 |
commit | 773fbda754de2dd91f8b6bfe754d1aa59368072b (patch) | |
tree | 566d07cdf582110f0a5c7c1eeb5f7ab01b11b792 | |
parent | 4724bb7922e1bb193117f13ffbd69fa4f97a29fb (diff) |
qxl_surface.c: Remove #if 0'd debug spew
-rw-r--r-- | src/qxl_surface.c | 173 |
1 files changed, 4 insertions, 169 deletions
diff --git a/src/qxl_surface.c b/src/qxl_surface.c index 06bee09..e39fde7 100644 --- a/src/qxl_surface.c +++ b/src/qxl_surface.c @@ -192,21 +192,6 @@ qxl_surface_cache_sanity_check (surface_cache_t *qxl) #endif } -#if 0 -void -qxl_surface_free_all (qxl_screen_t *qxl) -{ - for (i = 0; i < qxl->rom->n_surfaces; ++i) - { - qxl_surface_t *surface = &(all_surfaces[i]); - if (surface->in_use) - { - - } - } -} -#endif - static void print_cache_info (surface_cache_t *cache) { @@ -264,11 +249,6 @@ surface_get_from_cache (surface_cache_t *cache, int width, int height, int bpp) { int i; -#if 0 - ErrorF ("Before getting from cache\n"); - print_cache_info (cache); -#endif - for (i = 0; i < N_CACHED_SURFACES; ++i) { qxl_surface_t *s = cache->cached_surfaces[i]; @@ -282,32 +262,11 @@ surface_get_from_cache (surface_cache_t *cache, int width, int height, int bpp) { cache->cached_surfaces[i] = NULL; -#if 0 - ErrorF ("Got %d from cache\n", s->id); - print_cache_info (cache); -#endif return s; } } -#if 0 - else - { - if (s) - ErrorF ("!%d (%d %d %d, %d); ", s->id, - pixman_image_get_width (s->host_image), - pixman_image_get_height (s->host_image), - bpp, - s->bpp); - else - ErrorF ("[null]; "); - } -#endif } -#if 0 - ErrorF ("Nothing in cache for %d %d %d\n", width, height, bpp); -#endif - return NULL; } @@ -318,25 +277,9 @@ qxl_surface_recycle (surface_cache_t *cache, uint32_t id) { qxl_surface_t *surface = cache->all_surfaces + id; -#if 0 - ErrorF ("recycle %d\n", id); -#endif - -#if 0 - ErrorF ("freeing %p\n", surface->address); -#endif - n_live--; qxl_free (cache->qxl->surf_mem, surface->address); -#if 0 - ErrorF ("%d live\n", n_live); -#endif - -#if 0 - ErrorF (" Adding %d to free list\n", surface->id); -#endif - surface->next = cache->free_surfaces; cache->free_surfaces = surface; } @@ -397,10 +340,6 @@ qxl_surface_cache_create_primary (surface_cache_t *cache, surface->bpp = mode->bits; surface->next = NULL; surface->prev = NULL; - -#if 0 - ErrorF ("primary %p\n", surface->address); -#endif REGION_INIT (NULL, &(surface->access_region), (BoxPtr)NULL, 0); surface->access_type = UXA_ACCESS_RO; @@ -569,9 +508,6 @@ surface_get_from_free_list (surface_cache_t *cache) static int align (int x) { -#if 0 - return (x + 255) & ~255; -#endif return x; } @@ -657,10 +593,6 @@ retry: physical_address (qxl, surface->address, qxl->vram_mem_slot); push_surface_cmd (cache, cmd); - -#if 0 - ErrorF ("Allocated %d (%d %d %d)\n", surface->id, width, height, surface->bpp); -#endif dev_addr = (uint32_t *)((uint8_t *)surface->address + stride * (height - 1)); @@ -737,10 +669,6 @@ qxl_surface_set_pixmap (qxl_surface_t *surface, PixmapPtr pixmap) surface->pixmap = pixmap; assert (get_surface (pixmap) == surface); - -#if 0 - ErrorF ("setting pixmap %p on surface %p\n", pixmap, surface); -#endif } static void @@ -844,10 +772,6 @@ surface_add_to_cache (qxl_surface_t *surface) */ if (destroy_surface) qxl_surface_unref (destroy_surface->cache, destroy_surface->id); - -#if 0 - ErrorF ("Done\n"); -#endif } void @@ -858,12 +782,7 @@ qxl_surface_unref (surface_cache_t *cache, uint32_t id) qxl_surface_t *surface = cache->all_surfaces + id; if (--surface->ref_count == 0) - { -#if 0 - ErrorF ("destroying %d\n", id); -#endif send_destroy (surface); - } } } @@ -872,34 +791,14 @@ qxl_surface_kill (qxl_surface_t *surface) { unlink_surface (surface); -#if 0 - ErrorF ("killed %d (%d %d %d)\n", surface->id, - pixman_image_get_width (surface->host_image), - pixman_image_get_height (surface->host_image), - surface->bpp); -#endif - if (surface->id != 0 && pixman_image_get_width (surface->host_image) >= 128 && pixman_image_get_height (surface->host_image) >= 128) { -#if 0 - ErrorF ("Adding %d to cache\n", surface->id); -#endif surface_add_to_cache (surface); } -#if 0 - ErrorF ("After adding %d to cache\n", surface->id); - print_cache_info (surface->cache); -#endif - qxl_surface_unref (surface->cache, surface->id); - -#if 0 - ErrorF ("After unreffing %d\n", surface->id); - print_cache_info (surface->cache); -#endif } /* send anything pending to the other side */ @@ -922,10 +821,6 @@ download_box (qxl_surface_t *surface, int x1, int y1, int x2, int y2) ram_header->update_surface = surface->id; -#if 0 - ErrorF ("Issuing update command for %d\n", surface->id); -#endif - qxl_update_area(surface->cache->qxl); pixman_image_composite (PIXMAN_OP_SRC, @@ -962,19 +857,9 @@ qxl_surface_prepare_access (qxl_surface_t *surface, n_boxes = REGION_NUM_RECTS (region); boxes = REGION_RECTS (region); -#if 0 - ErrorF ("Preparing access to %d boxes\n", n_boxes); -#endif - stride = pixman_image_get_stride (surface->dev_image); height = pixman_image_get_height (surface->dev_image); -#if 0 - ErrorF ("Flattening %p -> %p (allocated end %p)\n", - surface->address, - surface->address + stride * height, surface->end); -#endif - if (n_boxes < 25) { while (n_boxes--) @@ -986,11 +871,9 @@ qxl_surface_prepare_access (qxl_surface_t *surface, } else { -#if 0 - ErrorF ("Downloading extents (%d > %d)\n", n_boxes, 25); -#endif - - download_box (surface, new.extents.x1, new.extents.y1, new.extents.x2, new.extents.y2); + download_box ( + surface, + new.extents.x1, new.extents.y1, new.extents.x2, new.extents.y2); } REGION_UNION (pScreen, @@ -1012,11 +895,6 @@ qxl_surface_prepare_access (qxl_surface_t *surface, pixman_image_get_data (surface->host_image)); pixmap->devKind = pixman_image_get_stride (surface->host_image); - -#if 0 - ErrorF ("stride %d\n", pixmap->devKind); - ErrorF ("height %d\n", pixmap->drawable.height); -#endif return TRUE; } @@ -1137,9 +1015,6 @@ qxl_surface_cache_evacuate_all (surface_cache_t *cache) qxl_surface_t *s; int i; -#if 0 - ErrorF ("Before evacucate\n"); -#endif for (i = 0; i < N_CACHED_SURFACES; ++i) { if (cache->cached_surfaces[i]) @@ -1149,10 +1024,6 @@ qxl_surface_cache_evacuate_all (surface_cache_t *cache) } } -#if 0 - ErrorF ("Evacuating all\n"); -#endif - s = cache->live_surfaces; while (s != NULL) { @@ -1170,10 +1041,6 @@ qxl_surface_cache_evacuate_all (surface_cache_t *cache) assert (get_surface (evacuated->pixmap) == s); -#if 0 - ErrorF ("Evacuated %d => %p\n", s->id, evacuated->pixmap); -#endif - evacuated->bpp = s->bpp; s->host_image = NULL; @@ -1199,12 +1066,6 @@ qxl_surface_cache_replace_all (surface_cache_t *cache, void *data) { evacuated_surface_t *ev; -#if 0 - ErrorF ("Before replace\n"); -#endif -#if 0 - ErrorF ("Replacing all\n"); -#endif if (!surface_cache_init (cache, cache->qxl)) { /* FIXME: report the error */ @@ -1220,10 +1081,6 @@ qxl_surface_cache_replace_all (surface_cache_t *cache, void *data) qxl_surface_t *surface; surface = qxl_surface_create (cache, width, height, ev->bpp); -#if 0 - ErrorF ("recreated %d\n", surface->id); - ErrorF ("%d => %p\n", surface->id, ev->pixmap); -#endif assert (surface->host_image); assert (surface->dev_image); @@ -1306,12 +1163,7 @@ qxl_surface_solid (qxl_surface_t *destination, qrect.left = x1; qrect.right = x2; -#if 0 - if (destination->u.solid_pixel == 0x0000) - p = 0xffccffcc; - else -#endif - p = destination->u.solid_pixel; + p = destination->u.solid_pixel; submit_fill (qxl, destination->id, &qrect, p); } @@ -1347,10 +1199,6 @@ qxl_surface_copy (qxl_surface_t *dest, print_region (" copy dest", &(dest->access_region)); #endif -#if 0 - ErrorF ("copy from %d to %d\n", dest->u.copy_src->id, dest->id); -#endif - qrect.top = dest_y1; qrect.bottom = dest_y1 + height; qrect.left = dest_x1; @@ -1377,13 +1225,6 @@ qxl_surface_copy (qxl_surface_t *dest, drawable = make_drawable (qxl, dest->id, QXL_DRAW_COPY, &qrect); -#if 0 - ErrorF ("Drawing %d to %d [area %d %d %d %d] (command is %p)\n", - dest->u.copy_src->id, dest->id, - qrect.left, qrect.top, qrect.right, qrect.bottom, - drawable); -#endif - drawable->u.copy.src_bitmap = physical_address (qxl, image, qxl->main_mem_slot); drawable->u.copy.src_area.left = src_x1; drawable->u.copy.src_area.top = src_y1; @@ -1399,12 +1240,6 @@ qxl_surface_copy (qxl_surface_t *dest, drawable->surfaces_dest[0] = dest->u.copy_src->id; drawable->surfaces_rects[0] = drawable->u.copy.src_area; -#if 0 - submit_fill (qxl, dest->id, &qrect, 0xffff00ff); - - usleep (70000); -#endif - assert (src_x1 >= 0); assert (src_y1 >= 0); |