Re: [Gegl-developer] gegl-gtk



On 3 July 2012 01:38, Hendrik Boom <hendrik topoi pooq com> wrote:
On Tue, Jul 03, 2012 at 01:28:38AM +0200, rassahah googlemail com wrote:
Jon Nordby <jononor gmail com> wrote:
CC'ing the GEGL mailing list, since there may be others interested.

Hi Isaac,

glad to hear gegl-gtk was useful to you. I will try to check our your
node editor work soon.

What exactly is the issue with nodes with infinite bounds? I have not
tested myself. Rendering of gegl:checkerboard sounds like some that
should just-work, so I'd be happy to accept patches if it does not.


I think the problem here is that a program like this:

    #include <gegl.h>
    int main (int argc, char **argv)
    {
      gegl_init (&argc, &argv);
      GeglNode *a = gegl_node_new ();
      gegl_node_set (a, "operation", "gegl:color", 0);
      gegl_node_process (a);
    }

does not terminate. It creates a single color node and tries to
gegl_node_process() it.  But because the color node produces an infinite
(virtual) image, the process node needs an infinitely long time to
process it. Or at least this is the way i understand it. In its way,
at least it is logical.

I think the problem here is not the process functionality, but the API;
the function gegl_node_process() does not have an error return value,
so it practically must not fail, and so it has to take the long path
of processing for all eternity (or until it runs out of  memory, whatever
happens first).

It almost looks as if there needs to be som kind of bounding box to
limit the processing to the part that might potentially be visible...
Not sure how consistent that would be to the rest og gegl, though.

That is how GEGL works in general. In fact, GEGL will only process the
region you request and its dependencies  (in contrast to processing
everything and then doing a final crop).
See gegl_processor_new+gegl_processor_work or gegl_node_blit.
gegl_node_process is just a convenience wrapper. I would expect it to
process the entire extent of the node, but it could be that this is
buggy or that the extent in this case is infinite or invalid?

-- 
Jon Nordby - www.jonnor.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]