Hi Marko, I do not know if anyone has actually tried to implement a GPU backend - but it is something I've given quite a bit of thought. The idea is briefly documented in brushlib/PERFORMANCE https://gitorious.org/mypaint/mypaint/source/master:brushlib/PERFORMANCE
Blending of the dab onto the surface is the responsibility of the MyPaintSurface backend. For the normal CPU tiled version, that code is found in brushlib/mypaint-tiled-surface.c and brushlib/brushmodes.c. Search for "draw_dab_pixels_" In addition to a surface backend, you will likely want a way to display the surface on screen - so that is the other thing that needs implementing. This could/should be OpenGL based, using the OpenCL+OpenGL interoperability if the surf backend is in OpenCL. For making full advantage of such a backend in MyPaint itself, one would also have to implement layers etc. on the GPU side. On 4 October 2013 23:30, brdavs <brd...@yahoo.com> wrote: > Hi, > > I have been browsing through brush engine in mypaint. > I am wondering if anybody has tried to implement the > backend in OpenGL/OpenCL. > > If I understand correctly, the "only" thing that is needed > to get brush engine working is to implement GPU-backed > MyPaintSurface with appropriate methods. Correct? > > One thing that is not immediately obvious to me is where > does blending occur. Namely, when you draw a dab > where does the blending occur? It seems that one would > want that to be done on the GPU as well. > > Is there anything else that would have to be rewritten to > take advantage of the GPU? > > Thanks, > > Marko -- Jon Nordby - www.jonnor.com _______________________________________________ Mypaint-discuss mailing list Mypaint-discuss@gna.org https://mail.gna.org/listinfo/mypaint-discuss