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 675337 - gegl_buffer_set_extent does not increase active buffer area
gegl_buffer_set_extent does not increase active buffer area
Status: RESOLVED FIXED
Product: GEGL
Classification: Other
Component: core
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks: 675962
 
 
Reported: 2012-05-02 22:41 UTC by Jon Nordby
Modified: 2012-05-20 11:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Testcase (1.12 KB, text/x-csrc)
2012-05-02 22:41 UTC, Jon Nordby
  Details
[PATCH] gegl/buffer: Make a buffer's abyss track its extent by default. (3.20 KB, patch)
2012-05-19 17:41 UTC, Mike Henning (drawoc)
committed Details | Review

Description Jon Nordby 2012-05-02 22:41:57 UTC
Created attachment 213338 [details]
Testcase

To reproduce:
1. Create a GeglBuffer with a given extent
2. Attempt to increase the extent of the buffer, using gegl_buffer_set_extent
3. Try to set the content of the area that is outside the original extent (but inside the new extent), using gegl_buffer_set or gegl_buffer_set_color

Expected result:
Content everywhere inside the current (new) extent is set

Actual result:
Only content inside the original extent is set
Comment 1 Michael Muré 2012-05-04 04:54:46 UTC
Something strange happen here. The extent is set correctly, and gegl_buffer_set_color iterate over the tiles for the new extent.

Still, color is only set in the previous extent.
Comment 2 Mike Henning (drawoc) 2012-05-19 04:15:04 UTC
This is simply because the buffer's abyss doesn't get adjusted.

Currently, the abyss can only be modified on construction.
It needs to be possible to modify the abyss extents, or else gegl_buffer_set_extent is worthless for growing buffers (as Jon discovered).
Comment 3 Mike Henning (drawoc) 2012-05-19 17:41:45 UTC
Created attachment 214447 [details] [review]
[PATCH] gegl/buffer: Make a buffer's abyss track its extent by default.

This simply makes the buffer's abyss rectangle behave a bit more like I'd expect by default.

GeglBuffers still need a way to modify their abyss rect after creation. All this patch does is make things work smoothly when a user stays away from setting the abyss rect themselves.
Comment 4 Jon Nordby 2012-05-20 11:47:44 UTC
Committed to master. Thanks!

commit f8ec9391dce87baf1db41c84867e71c6e6b8ad23
Author: Michael Henning <mikehenning@eclipse.net>
Date:   Sat May 19 12:35:23 2012 -0400

    buffer: Make a buffer's abyss track its extent by default.
    
    This does not happen if the buffer's abyss was modified by the user
    or if the user modified its parent's abyss.
    
    Fixes: Bug 675337 - gegl_buffer_set_extent does not increase active buffer area


Also added automated test.

commit fdd2b1dd35063db7d55541d520807e976147be7a
Author: Jon Nordby <jononor@gmail.com>
Date:   Sun May 6 04:47:24 2012 +0200

    tests: Automated test for growing buffer extent
    
    Testcase for: Bug 675337 - gegl_buffer_set_extent does not increase active buffer area
Comment 5 Jon Nordby 2012-05-20 11:48:48 UTC
Review of attachment 214447 [details] [review]:

Comitted
Comment 6 Jon Nordby 2012-05-20 11:53:55 UTC
Closing as fixed. The ability to change abyss manually can go in a separate bugreport.