For conversions that have no dither options (like RGB -> GRAY or u8 ->
u16), always preserve text editability, for conversions that have
dither options (like RGB -> INDEXED or u16 -> u8), give the user the
choice whether to enable dithering.
Add "layer_dither_type" and "mask_dither_type" to
GimpDrawable::convert_type(), pass around the dither type from the
dialog, and implement dithering using gegl:color-reduction.
==7785== 96 bytes in 4 blocks are definitely lost in loss record 16,947 of 20,720
==7785== at 0x4A0884D: malloc (/builddir/build/BUILD/valgrind-3.7.0/coregrind/m_replacemalloc/vg_replace_malloc.c:263)
==7785== by 0x87F52DE: g_malloc (glib/glib/gmem.c:159)
==7785== by 0x8809741: g_slice_alloc (glib/glib/gslice.c:1003)
==7785== by 0x87EBF0D: g_list_prepend (glib/glib/glist.c:275)
==7785== by 0x6FA596: gimp_item_stack_get_item_list (gimp/app/core/gimpitemstack.c:175)
==7785== by 0x6D97B4: gimp_image_convert_precision (gimp/app/core/gimpimage-convert-precision.c:55)
==7785== by 0x49B62E: image_convert_precision_cmd_callback (gimp/app/actions/image-commands.c:236)
And along with it a lot of stuff like the drawable preview cache, the
gegl tile manager backend, temporary gimp_gegl_buffer_foo() stuff, and
the remaining bits of performance.
The projection is in an evil semi-ported state which makes it work
ok-ish for stuff like layer moving, but absolutely unbearable for
painting, there is also an off-by-one rendering glitch at some zoom
levels.