GNOME Bugzilla – Bug 675337
gegl_buffer_set_extent does not increase active buffer area
Last modified: 2012-05-20 11:53:55 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
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.
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).
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.
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
Review of attachment 214447 [details] [review]: Comitted
Closing as fixed. The ability to change abyss manually can go in a separate bugreport.