- if ((gdk_visual_get_best() != gdk_visual_get_system()) && (m_useBestVisual))
- {
- /* seems gtk_widget_set_default_visual no longer exists? */
- GdkVisual* vis = gtk_widget_get_default_visual();
-
- GdkColormap *colormap = gdk_colormap_new( vis, FALSE );
- gtk_widget_set_default_colormap( colormap );
-
- visual = vis;
- }
-
- // Nothing to do for 15, 16, 24, 32 bit displays
- if (visual->depth > 8) return true;
-
- // initialize color cube for 8-bit color reduction dithering
-
- GdkColormap *cmap = gtk_widget_get_default_colormap();
-
- m_colorCube = (unsigned char*)malloc(32 * 32 * 32);
-
- for (int r = 0; r < 32; r++)