bugMyPaint - Bugs: bug #19732, Use GEGL in MyPaint

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #19732: Use GEGL in MyPaint

Submitted by:  Jon Nordby <jonnor>
Submitted on:  Sun 13 May 2012 12:51:16 AM UTC  
 
Severity: 3 - NormalPriority: 5 - Normal
Status: In ProgressPrivacy: Public
Assigned to: NoneOpen/Closed: Open
Release: Planned Release: None
Operating System: 

(Jump to the original submission Jump to the original submission)

Fri 04 Jan 2013 09:54:48 PM UTC, comment #9:

Moving to in-progress, as work has been done. In particular, the performance is now (more than) good enough to start using GEGL.
http://www.jonnor.com/2012/11/improved-drawing-performance-in-mypaint-brush-engine/

I hope to complete Milestone 1, using GeglBuffer to back our surface, for MyPaint 1.2.

Jon Nordby <jonnor>
Project Administrator
Thu 14 Jun 2012 10:30:19 PM UTC, comment #8:

The steps proposed in comment #6 have now been implemented. In addition, the existing work has been pushed to master.

I've also updated README.gegl to include a TODO section with milestones/tasks. https://gitorious.org/mypaint/mypaint/blobs/HEAD/README.gegl

I fear that milestones 1-3 may not be realizable independently, though I hope that it is.

Jon Nordby <jonnor>
Project Administrator
Wed 16 May 2012 06:25:38 AM UTC, comment #7:

In case you're going to struggle with the build system anyway, let me just add that I would be happy if we can switch to distutils instead of scons. A possible path of migration would be to not use scons any more for newer stuff.

Martin Renold <martinxyz>
Project Administrator
Tue 15 May 2012 09:38:15 PM UTC, comment #6:

Proposed next steps:
lib/document.py: Make GDKPixbuf and other pyGTK based dependencies optional. This should allow it to be used in the mypaint-gegl.py demo application.
gui/tileddrawwidget.py: Refactor out eventhandling into a Gtk.EventBox subclass. The view widget to be used in MyPaint will then be a TiledDrawWidget inside this eventbox. gui/document.py might also be influenced by this change. This should make it possible to reuse this widget in mypaint-gegl.py, where the view widget would be a GeglGtk.View inside the eventbox.
May also require removing/making optional dependencies on other widgets from tileddrawwidget.py

These are both changes that could hopefully go into master.

Jon Nordby <jonnor>
Project Administrator
Tue 15 May 2012 09:10:41 PM UTC, comment #5:

Just a note about the criteria for going switching to GEGL in MyPaint. The GEGL based implementation needs to:
1) Be feature complete
2) Render the same way
3) Not be significantly slower. Say be within ~20%

Jon Nordby <jonnor>
Project Administrator
Sun 13 May 2012 03:41:11 AM UTC, comment #4:

On a related note. Martin investigated moving to using 32bit floats instead of 16 bit integers for the brush engine. This is wanted when using GEGL so that standard operations can be used without color format conversions*.
Drawing performance remained very close across different brush sizes. The main issue is that memory consumption will be twice as high. Hopefully once we use GEGL this will be OK as GeglBuffer can transparently keep the buffers on disk instead of in memory.

  • The alternative is to implement fast-paths for our 16bit integer format to all the GEGL operations we want, but that is probably not worth the effort.
Jon Nordby <jonnor>
Project Administrator
Sun 13 May 2012 03:23:10 AM UTC, comment #3:

Because one cannot combine PyGObject (required for GEGL and GEGL-GTK) with PyGTK in a single application process, we would need to complete that work before this could be integrated. See bug #19230

Jon Nordby <jonnor>
Project Administrator
Sun 13 May 2012 03:05:37 AM UTC, comment #2:

Current status:

There is now a "gegl" branch available in the mainline MyPaint repository. See README.gegl for how to test/develop.
https://gitorious.org/mypaint/mypaint/commits/gegl
https://gitorious.org/mypaint/mypaint/trees/gegl

In this branch is a working Surface implementation based on GeglBuffer, as well as load/save support for PNG files.

There are a number of (mostly easy-to-fix) issues that would need to be fixed in the GEGL project for MyPaint to use it. See
https://bugzilla.gnome.org/show_bug.cgi?id=675962

Jon Nordby <jonnor>
Project Administrator
Sun 13 May 2012 01:11:29 AM UTC, comment #1:

Implementation strategy for initial porting:
1. Brush engine: Use a GeglBuffer to back the Surface API instead of lib/tiledsurface.{hpp,py}
2. Document model: Let each Layer have a GeglNode representing that layer. Compositing is done by a GEGL graph that combines these nodes together. This removes the need for lib/pixelops.hpp and lib/composite_rgbx.hpp
3. Import/export: Use GEGL file operations like file-png and file-jpeg instead of GdkPixbuf and lib/fastpng.hpp
4. Rendering: Use GeglGtkView from the gegl-gtk library instead of gui/tileddrawwidget.py. Pass the GeglNode of the composited node to the widget.

Jon Nordby <jonnor>
Project Administrator
Sun 13 May 2012 12:51:16 AM UTC, original submission:

Use GEGL as the backend for image processing instead of the current custom code.

The motivation behind this change includes:

  • Allow to operate on larger-than-RAM images
  • Make it easy to add new features that involves image processing
  • Make the MyPaint brush engine available to other projects
  • Help make GEGL an excellent libre graphics processing library
  • Perhaps make it possible to make use of OpenCL & OpenGL on supported systems to increase performance
  • Perhaps make it possible to inter-operate more closely with other applications
Jon Nordby <jonnor>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by achadwick
  • -unavailable- added by martinxyz (Posted a comment)
  • -unavailable- added by jonnor (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 04 Jan 2013 09:54:48 PM UTCjonnorStatusWish=>In Progress
    Wed 28 Nov 2012 11:45:52 AM UTCachadwickCarbon-Copy-=>Added achadwick
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup