How to test the proof-of-concept MyPaint+GEGL work.

The status of this work is tracked in
https://gna.org/bugs/index.php?19732

== Prerequsites ==
These are in addition to the normal prerequsites for MyPaint.

1. BABL from git master
2. GEGL from git master
3. GEGL-GTK from git master

All projects must be built with GObject Introspection support.
Pass --enable-introspection to configure to enable. 

It is recommended that the projects are installed into
a custom prefix. Pass --prefix $prefix to configure,
and set the following env vars.

 export XDG_DATA_DIRS=$prefix/share/:$XDG_DATA_DIRS
 export GI_TYPELIB_PATH=$prefix/lib/girepository-1.0
 export PKG_CONFIG_PATH=$prefix/lib/pkgconfig
 export LD_LIBRARY_PATH=$prefix/lib

After this build MyPaint with the enable_gegl flag
 
 scons enable_gegl=true

== Testing ==
Currently MyPaint + GEGL can run a couple of test, and power
a simple test application.

 export MYPAINT_ENABLE_GEGL=1

 python tests/test_mypaintlib.py

 python mypaint-gegl.py

Currently the normal MyPaint application will not work correctly
when built together with GEGL. But for the daring, here is how to try:

  export MYPAINT_ENABLE_GEGL=1
 ./mypaint

== TODO ==

Milestone 1: Use GeglBuffer as surface backend
 * Make the performance of GeglBuffer based implementation equal or better. See brushlib/PERFORMANCE for hints
 * Remove lib/tiledsurface.hpp, lib/pythontiledsurface.c
 + Benefit: MyPaint can operate on larger-than-ram images
 + Benefit: Remove ~400 sloc

Milestone 2: Use a GEGL graph for compositing of document
 * Move brushlib to 32bit floats. To avoid color conversions between other GEGL compositing ops
 * Add a GEGL graph to lib.document.Document that is kept in sync with changes
 * Use a gegl:layer with appropriate layer modes instead of current tile-based blending modes
 * Remove lib/pixops.hpp lib/composite_rgbx.hpp
 * Make layer move be done by changing the offset of a gegl:layer instead of lib.tiledsurface.InteractiveMove
 \ Depends on: sRGB compositing ops in GEGL
 + Benefit: MyPaint can make use of GEGL operations for post-processing. Filters, color-correction
 + Benefit: Remove ~600 sloc

Milestone 3: Use GeglGtkView for the rendering widget
 * Use GeglGtkView in gui.tileddrawwidget.TiledDrawWidget instead of CanvasRenderer
 \ Depends on: Rotation support in GeglGtkView
 + Benefit: Overloading of stroke drawing will give incremental user feedback, not freeze UI
 + Benefit: Remove ~300 sloc

Milestone 4: Use PNG import/export support from GEGL
 * Make the GEGL PNG load/save performance be as good or better as current
 * Make load/save of PNGs in GEGL respect ICC profiles
 \ Depends on: ICC-based color conversions in GEGL
 * Benefit: Everyone using GEGL will have fast, color-managed PNG export/import
 * Benefit: Remove ~400 sloc

Milestone 5: Move OpenRaster support into GEGL
 * Implement load/save support of OpenRaster as GEGL operations
 * Use these in lib.document.Document, maintaining a mapping between opened GEGL graph and internal document structure
 * Remove save_ora / load_ora from lib.document.Document
 + Benefit: OpenRaster implementation can be used by everyone using GEGL
 + Benefit: OpenRaster load-save roundtrips should be able to preserve data MyPaint does not know
 + Benefit: Remove ~150 sloc

Milestone 6: Make paint strokes be GEGL operations
 * Create a GEGL operation "mypaint:stroke", making use of MyPaintBrush and MyPaintGeglSurface
   the operation has two attributes, the path and the brush(settings)
 * Use this in lib.document.Document: every new stroke is a new GeglNode that is inserted in graph
 \ Depends on: Additions to GeglPath to store pressure,tilt,time information
 + Benefit: GEGL gets a painting system that applications can share
 + Benefit: Unified way of handling changes to the document, it is all changes in the GEGL graph

Milestone 7: Use GEGL graph journal for undo/redo system
 * Change lib.document.Document to make do()/undo() wrap the GEGL graph journal  
 * Remove lib/command.py
 \ Depends on: Journal implementation in GEGL
 + Benefit: Undo/redo history can be shared between applications using GEGL
 + Benefit: User could operate on a document using multiple applications
 + Benefit: Remove ~300 sloc
