Index: trunk/src/hid.h =================================================================== --- trunk/src/hid.h (revision 15903) +++ trunk/src/hid.h (revision 15904) @@ -481,35 +481,6 @@ void (*edit_attributes)(const char *owner, pcb_attribute_list_t *attrlist); - /* Debug drawing support. These APIs must be implemented (non NULL), - * but they do not have to be functional. request_debug_draw can - * return NULL to indicate debug drawing is not permitted. - * - * Debug drawing is not guaranteed to be re-entrant. - * The caller must not nest requests for debug drawing. - */ - - /* Request permission for debug drawing - * - * Returns a HID pointer which should be used rather than the global - * gui-> for making drawing calls. If the return value is NULL, then - * permission has been denied, and the drawing must not continue. - */ - pcb_hid_t *(*request_debug_draw)(void); - - /* Flush pending drawing to the screen - * - * May be implemented as a NOOP if the GUI has chosen to send the - * debug drawing directly to the screen. - */ - void (*flush_debug_draw)(void); - - /* When finished, the user must inform the GUI to clean up resources - * - * Any remaining rendering will be flushed to the screen. - */ - void (*finish_debug_draw)(void); - /* Notification to the GUI around saving the PCB file. * * Called with a false parameter before the save, called again Index: trunk/src/hid_nogui.c =================================================================== --- trunk/src/hid_nogui.c (revision 15903) +++ trunk/src/hid_nogui.c (revision 15904) @@ -385,19 +385,6 @@ return 0; } -static pcb_hid_t *nogui_request_debug_draw(void) -{ - return NULL; -} - -static void nogui_flush_debug_draw(void) -{ -} - -static void nogui_finish_debug_draw(void) -{ -} - static void nogui_create_menu(const char *menu, const char *action, const char *mnemonic, const char *accel, const char *tip, const char *cookie) { } @@ -454,9 +441,6 @@ hid->show_item = nogui_show_item; hid->beep = nogui_beep; hid->progress = nogui_progress; - hid->request_debug_draw = nogui_request_debug_draw; - hid->flush_debug_draw = nogui_flush_debug_draw; - hid->finish_debug_draw = nogui_finish_debug_draw; hid->create_menu = nogui_create_menu; } Index: trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c =================================================================== --- trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 15903) +++ trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 15904) @@ -1374,26 +1374,6 @@ return FALSE; } -static pcb_hid_t *ghid_gdk_request_debug_draw(void) -{ - /* No special setup requirements, drawing goes into - * the backing pixmap. */ - return >k2_gdk_hid; -} - -static void ghid_gdk_flush_debug_draw(void) -{ - ghid_gdk_screen_update(); - gdk_flush(); -} - -static void ghid_gdk_finish_debug_draw(void) -{ - ghid_gdk_flush_debug_draw(); - /* No special tear down requirements - */ -} - static void draw_lead_user(render_priv_t *priv) { GdkWindow *window = gtk_widget_get_window(gport->drawing_area); @@ -1479,9 +1459,5 @@ hid->fill_polygon = ghid_gdk_fill_polygon; hid->fill_polygon_offs = ghid_gdk_fill_polygon_offs; hid->fill_rect = ghid_gdk_fill_rect; - - hid->request_debug_draw = ghid_gdk_request_debug_draw; - hid->flush_debug_draw = ghid_gdk_flush_debug_draw; - hid->finish_debug_draw = ghid_gdk_finish_debug_draw; } } Index: trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c =================================================================== --- trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 15903) +++ trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 15904) @@ -1094,61 +1094,6 @@ return FALSE; } -pcb_hid_t *ghid_gl_request_debug_draw(void) -{ - GHidPort *port = gport; - GtkWidget *widget = port->drawing_area; - GtkAllocation allocation; - - gtk_widget_get_allocation(widget, &allocation); - - ghid_gl_start_drawing(port); - - glViewport(0, 0, allocation.width, allocation.height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(0, allocation.width, allocation.height, 0, 0, 100); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0f, 0.0f, -Z_NEAR); - -/* hidgl_init_triangle_array(&buffer);*/ - ghid_gl_invalidate_current_gc(); - - /* Setup stenciling */ - glDisable(GL_STENCIL_TEST); - - glPushMatrix(); - glScalef((conf_core.editor.view.flip_x ? -1. : 1.) / port->view.coord_per_px, - (conf_core.editor.view.flip_y ? -1. : 1.) / port->view.coord_per_px, (conf_core.editor.view.flip_x == conf_core.editor.view.flip_y) ? 1. : -1.); - glTranslatef(conf_core.editor.view.flip_x ? port->view.x0 - PCB->MaxWidth : - -port->view.x0, conf_core.editor.view.flip_y ? port->view.y0 - PCB->MaxHeight : -port->view.y0, 0); - - return >k2_gl_hid; -} - -void ghid_gl_flush_debug_draw(void) -{ - GtkWidget *widget = gport->drawing_area; - GdkGLDrawable *pGlDrawable = gtk_widget_get_gl_drawable(widget); - - drawgl_flush(); - - if (gdk_gl_drawable_is_double_buffered(pGlDrawable)) - gdk_gl_drawable_swap_buffers(pGlDrawable); - else - glFlush(); -} - -void ghid_gl_finish_debug_draw(void) -{ - drawgl_flush(); - glPopMatrix(); - - ghid_gl_end_drawing(gport); -} - static void draw_lead_user(render_priv_t * priv) { int i; @@ -1225,10 +1170,6 @@ hid->set_drawing_mode = hidgl_set_drawing_mode; hid->render_burst = ghid_gl_render_burst; - hid->request_debug_draw = ghid_gl_request_debug_draw; - hid->flush_debug_draw = ghid_gl_flush_debug_draw; - hid->finish_debug_draw = ghid_gl_finish_debug_draw; - hid->holes_after = 1; } } Index: trunk/src_plugins/hid_gtk3_cairo/gtkhid-cairo.c =================================================================== --- trunk/src_plugins/hid_gtk3_cairo/gtkhid-cairo.c (revision 15903) +++ trunk/src_plugins/hid_gtk3_cairo/gtkhid-cairo.c (revision 15904) @@ -1563,26 +1563,6 @@ return FALSE; } -static pcb_hid_t *ghid_cairo_request_debug_draw(void) -{ - /* No special setup requirements, drawing goes into - * the backing pixmap in GTK2. */ - return >k3_cairo_hid; -} - -static void ghid_cairo_flush_debug_draw(void) -{ - ghid_cairo_screen_update(); - gdk_flush(); -} - -static void ghid_cairo_finish_debug_draw(void) -{ - ghid_cairo_flush_debug_draw(); - /* No special tear down requirements - */ -} - static void draw_lead_user(render_priv_t * priv) { //GdkWindow *window = gtk_widget_get_window(gport->drawing_area); @@ -1666,10 +1646,5 @@ hid->fill_polygon = ghid_cairo_fill_polygon; hid->fill_polygon_offs = ghid_cairo_fill_polygon_offs; hid->fill_rect = ghid_cairo_fill_rect; - - hid->request_debug_draw = ghid_cairo_request_debug_draw; - hid->flush_debug_draw = ghid_cairo_flush_debug_draw; - hid->finish_debug_draw = ghid_cairo_finish_debug_draw; - } } Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 15903) +++ trunk/src_plugins/hid_lesstif/main.c (revision 15904) @@ -3701,33 +3701,6 @@ return progress_cancelled; } -static pcb_hid_t *lesstif_request_debug_draw(void) -{ - /* Send drawing to the backing pixmap */ - pixmap = main_pixmap; - return &lesstif_hid; -} - -static void lesstif_flush_debug_draw(void) -{ - /* Copy the backing pixmap to the display and redraw any attached objects */ - XSetFunction(display, my_gc, GXcopy); - XCopyArea(display, main_pixmap, window, my_gc, 0, 0, view_width, view_height, 0, 0); - pixmap = window; - if (crosshair_on) { - pcb_draw_attached(); - pcb_draw_mark(); - } - pixmap = main_pixmap; -} - -static void lesstif_finish_debug_draw(void) -{ - lesstif_flush_debug_draw(); - /* No special tear down requirements - */ -} - static void lesstif_get_view_size(pcb_coord_t *width, pcb_coord_t *height) { *width = Pz(view_width); @@ -3842,10 +3815,6 @@ lesstif_hid.edit_attributes = lesstif_attributes_dialog; lesstif_hid.point_cursor = PointCursor; - lesstif_hid.request_debug_draw = lesstif_request_debug_draw; - lesstif_hid.flush_debug_draw = lesstif_flush_debug_draw; - lesstif_hid.finish_debug_draw = lesstif_finish_debug_draw; - lesstif_hid.create_menu = lesstif_create_menu; lesstif_hid.remove_menu = lesstif_remove_menu; lesstif_hid.usage = lesstif_usage;