After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 761547 - Freeze the GeglOperation when changing properties
Freeze the GeglOperation when changing properties
Status: RESOLVED FIXED
Product: GEGL
Classification: Other
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks:
 
 
Reported: 2016-02-04 11:54 UTC by Debarshi Ray
Modified: 2016-02-06 17:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GeglNode: Freeze the GeglOperation when changing properties (1.62 KB, patch)
2016-02-04 12:02 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2016-02-04 11:54:08 UTC
If I have a graph like:
  src -> ... -> crop (x1, y1, w1, h1) -> ... -> ouput

Then changing the properties of the crop to (x2, y2, w2, h2) leads to GeglNode::invalidated being emitted four times with some misleading rectangles. This is because gegl_node_property_changed takes the bounding box of the rectangles before and after the change. In this case it leads to:
  (i) bbox ((x1, y1, w1, h1), (x2, y1, w1, h1))
 (ii) bbox ((x1, y1, w1, h1), (x2, y2, w1, h1))
(iii) bbox ((x1, y1, w1, h1), (x2, y2, w2, h1))
 (iv) bbox ((x1, y1, w1, h1), (x2, y2, w2, h2))

All but (iv) are bogus, and can be confusing when debugging. We should only emit invalidated with the rectangle in (iv).

Freezing the GeglOperation during property changes is one way to achieve that.
Comment 1 Debarshi Ray 2016-02-04 12:02:58 UTC
Created attachment 320423 [details] [review]
GeglNode: Freeze the GeglOperation when changing properties
Comment 2 Debarshi Ray 2016-02-06 17:15:30 UTC
Comment on attachment 320423 [details] [review]
GeglNode: Freeze the GeglOperation when changing properties

Pushed to master.
Comment 3 Debarshi Ray 2016-02-06 17:15:47 UTC
commit 5918eeee3002c6187d6ff5f11a0d18f600378030
Author: Debarshi Ray <debarshir@gnome.org>
Date:   Thu Feb 4 13:00:37 2016 +0100

    GeglNode: Freeze the GeglOperation when changing properties
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761547