Commit fa3f4562 authored by Jeremy White's avatar Jeremy White

Review all remaining FIXME messages.

Switch to TODO (Spice standard) where appropriate, remove
elsewhere.
parent 96977bd8
......@@ -2,4 +2,5 @@ The current active x11spice maintainer is
Jeremy White <jwhite@codeweavers.com>
FIXME. Mad props to x11vnc.
Note that this project derives a great deal of inspiration from the x11vnc
project; the initial author wanted to be sure to give mad props to them.
......@@ -167,7 +167,6 @@ static void *handle_xevents(void *opaque)
pixman_region_init(&damage_region);
// FIXME - we do not have a good way to cause this thread to exit gracefully
while ((ev = xcb_wait_for_event(display->c))) {
if (ev->response_type == display->xfixes_ext->first_event + XCB_XFIXES_CURSOR_NOTIFY)
handle_cursor_notify(display, (xcb_xfixes_cursor_notify_event_t *) ev);
......@@ -197,7 +196,7 @@ static void *handle_xevents(void *opaque)
static int register_for_events(display_t *d)
{
uint32_t events = XCB_EVENT_MASK_STRUCTURE_NOTIFY; // FIXME - do we need this? | XCB_EVENT_MASK_POINTER_MOTION;
uint32_t events = XCB_EVENT_MASK_STRUCTURE_NOTIFY;
xcb_void_cookie_t cookie;
xcb_generic_error_t *error;
......@@ -321,6 +320,17 @@ int display_open(display_t *d, session_t *session)
return rc;
}
/*
TODO: Implement a cache for shared memory handles
That is, instead of doing the shmget/shmat for every read,
we should cache the shmid, and reuse if we're doing a later
read of a similar size.
We would likely see a 40% improvement in raw read time. Note
that a callgrind run suggested that would be on the order of 5%
overall.
*/
shm_image_t *create_shm_image(display_t *d, int w, int h)
{
shm_image_t *shmi;
......@@ -448,7 +458,6 @@ void destroy_shm_image(display_t *d, shm_image_t *shmi)
free(shmi);
}
// FIXME - Can we / should we do pushing to spice using the fullscreen?
int display_create_screen_images(display_t *d)
{
d->fullscreen = create_shm_image(d, 0, 0);
......@@ -480,7 +489,6 @@ void display_destroy_screen_images(display_t *d)
int display_start_event_thread(display_t *d)
{
// FIXME - gthread?
return pthread_create(&d->event_thread, NULL, handle_xevents, d);
}
......
......@@ -45,7 +45,6 @@ typedef struct {
SpiceTabletInstance tablet_sin;
uint32_t buttons_state;
QXLWorker *worker;
int compression_level;
struct session_struct *session;
......
......@@ -59,7 +59,6 @@ static int scanlines[NUM_SCANLINES] = {
};
// FIXME - refactor and move this...
static QXLDrawable *shm_image_to_drawable(spice_t *s, shm_image_t *shmi, int x, int y)
{
QXLDrawable *drawable;
......@@ -109,8 +108,6 @@ static QXLDrawable *shm_image_to_drawable(spice_t *s, shm_image_t *shmi, int x,
qxl_image->bitmap.palette = 0;
qxl_image->bitmap.data = (QXLPHYSICAL) shmi->shmaddr;
// FIXME - cache images at all?
return drawable;
}
......@@ -389,7 +386,6 @@ int scanner_create(scanner_t *scanner)
scanner->current_scanline = 0;
pixman_region_init(&scanner->region);
scanner->target_fps = MIN_SCAN_FPS;
// FIXME - gthread?
return pthread_create(&scanner->thread, NULL, scanner_run, scanner);
}
......
......@@ -220,7 +220,6 @@ static void flush_and_lock(session_t *s)
break;
g_mutex_unlock(s->lock);
// FIXME - g_threads?
sched_yield();
}
}
......
......@@ -196,7 +196,6 @@ static void channel_event(int event, SpiceChannelEventInfo *info)
static void attach_worker(QXLInstance *qin, QXLWorker *qxl_worker)
{
static int count = 0;
spice_t *s = SPICE_CONTAINEROF(qin, spice_t, display_sin);
static QXLDevMemSlot slot = {
.slot_group_id = 0,
......@@ -214,21 +213,18 @@ static void attach_worker(QXLInstance *qin, QXLWorker *qxl_worker)
}
spice_qxl_add_memslot(qin, &slot);
// FIXME - do we ever need the worker?
s->worker = qxl_worker;
}
static void set_compression_level(QXLInstance *qin, int level)
{
spice_t *s = SPICE_CONTAINEROF(qin, spice_t, display_sin);
// FIXME - compression level unused?
// TODO - set_compression_level is unused
s->compression_level = level;
}
// FIXME - deprecated?
static void set_mm_time(QXLInstance *qin, uint32_t mm_time)
{
g_debug("FIXME! UNIMPLEMENTED! %s", __func__);
g_debug("TODO: %s UNIMPLEMENTED!", __func__);
}
static void get_init_info(QXLInstance *qin, QXLDevInitInfo *info)
......@@ -239,9 +235,8 @@ static void get_init_info(QXLInstance *qin, QXLDevInitInfo *info)
info->memslot_id_bits = 1;
info->memslot_gen_bits = 1;
info->n_surfaces = 1;
// FIXME - think about surface count, and no thoughtfulness on this
// uint32_t qxl_ram_size;
// uint8_t internal_groupslot_id;
/* TODO - it would be useful to think through surface count a bit here */
}
......@@ -308,12 +303,12 @@ static int req_cursor_notification(QXLInstance *qin)
static void notify_update(QXLInstance *qin, uint32_t update_id)
{
g_debug("FIXME! UNIMPLEMENTED! %s", __func__);
g_debug("TODO: %s UNIMPLEMENTED", __func__);
}
static int flush_resources(QXLInstance *qin)
{
g_debug("FIXME! UNIMPLEMENTED! %s", __func__);
g_debug("TODO: %s UNIMPLEMENTEDs", __func__);
// Return 0 to direct the server to flush resources
return 1;
}
......@@ -327,7 +322,7 @@ static void async_complete(QXLInstance *qin, uint64_t cookie)
static void update_area_complete(QXLInstance *qin, uint32_t surface_id,
struct QXLRect *updated_rects, uint32_t num_updated_rects)
{
g_debug("FIXME! UNIMPLEMENTED! %s", __func__);
g_debug("TODO: %s UNIMPLEMENTED!", __func__);
}
static int client_monitors_config(QXLInstance *qin, VDAgentMonitorsConfig *monitors_config)
......@@ -348,7 +343,7 @@ static int client_monitors_config(QXLInstance *qin, VDAgentMonitorsConfig *monit
monitors_config->monitors[i].depth,
monitors_config->monitors[i].x, monitors_config->monitors[i].y);
g_debug("FIXME! UNIMPLEMENTED! %s", __func__);
g_debug("TODO: %s UNIMPLEMENTED", __func__);
return FALSE;
}
......@@ -425,7 +420,7 @@ static uint8_t kbd_get_leds(SpiceKbdInstance *sin)
void tablet_set_logical_size(SpiceTabletInstance *tablet, int width, int height)
{
g_debug("FIXME! UNIMPLEMENTED! %s (width %dx%d)", __func__, width, height);
g_debug("TODO: %s UNIMPLEMENTED. (width %dx%d)", __func__, width, height);
}
void tablet_position(SpiceTabletInstance *tablet, int x, int y, uint32_t buttons_state)
......@@ -474,7 +469,8 @@ int spice_create_primary(spice_t *s, int w, int h, int bytes_per_line, void *shm
memset(&surface, 0, sizeof(surface));
surface.height = h;
surface.width = w;
// FIXME - negative stride?
/* TODO - explore negative stride */
surface.stride = bytes_per_line;
surface.type = QXL_SURF_TYPE_PRIMARY;
surface.flags = 0;
......@@ -484,7 +480,7 @@ int spice_create_primary(spice_t *s, int w, int h, int bytes_per_line, void *shm
// Position appears to be completely unused
surface.position = 0;
// FIXME - compute this dynamically?
/* TODO - compute this dynamically */
surface.format = SPICE_SURFACE_FMT_32_xRGB;
surface.mem = (QXLPHYSICAL) shmaddr;
......
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