Commit Graph

89 Commits

Author SHA1 Message Date
Jehan c892de85df app: port some of the paint and fill code to GeglColor. 2024-02-11 23:28:03 +01:00
Alx Sa e678a20951 core: Initial non-destructive editing implementation
This patch implements an initial form of
non-destructive editing. Filters now stay active
instead of being immediately merged down.
A new column is added to the layer tree view, which
can be clicked to show a pop-over menu.
Filters can currently be hidden/shown, edited, reordered,
deleted, and merged down from this pop-over menu.

Currently, this works on layers and layer selections only.
Plenty of room for improvement!
2024-01-23 15:39:09 +00:00
Jehan e495fe7ede app: fix 2 GeglBuffer leaks and a profile leak. 2023-11-25 21:38:10 +01:00
Shubham 8bfa22b663 app: gimp_gegl_buffer_resize function can accept pattern to fill buffer
Modified gimp_gegl_buffer_resize function to add three new parameters,
pattern, pattern_offset_x and pattern_offset_y. If pattern is not NULL,
then we set the pattern of buffet to this value. Like in
gimp_gegl_buffer_resize function, this logic is mostly copied from
gimp_drawable_fill_buffer function with minor changes.
2023-11-25 16:19:43 +00:00
Shubham 9ccb027aaa app: Create gimp_gegl_buffer_resize function
This function returns resized version of the input buffer. It also takes
in a color argument. The layer background will be filled with this
color. Fill background logic is similar to gimp_drawable_fill_buffer.
2023-11-25 16:19:43 +00:00
Michael Natterer ea83d54cb1 app: move gimp_get_geglopclasses() to gegl/gimp-gegl-utils.[ch]
and rename it to gimp_gegl_get_op_classes(). This looks much cleaner,
just don't look at the internal op blacklisting code...
2023-05-25 01:04:54 +02:00
Ell 8c619bf0b2 app: add gimp_gegl_node_has_key()
... which determines if a node's operation-class has a specific
key, and can be used instead of gimp_gegl_node_get_key() when only
existence is important, to avoid compiler warnings.

Update the rest of the code to use the new function.
2020-04-07 19:02:18 +03:00
Ell bed825ab3d app: add gimp_gegl_node_get_key()
... which gets an operation-class key for the operation associated
with the node, if any.
2020-01-17 12:08:30 +02:00
Ell 564afeda8b app: in gimp_gegl_buffer_set_extent(), clear full OOB region
In gimp_gegl_buffer_set_extent(), clear the full now-out-of-bounds
region of the buffer, instead of only full out-of-bounds tiles;
however, we still make sure to clear full tiles, instead of partial
tiles, as much as possible.  This prevents (parts of) the old
content of the buffer from showing when it's enlarged again.  This
is especially relevant for the image projection, once we add
support for a dynamically-expanding canvas in the following
commits, since the projection of a reexpanded buffer can be
temporarily rendered to the display before it's fully
reconstructed, exposing parts of the old content.
2019-09-04 19:16:40 +03:00
Ell 90610ac87e app: add gimp_gegl_buffer_set_extent()
.... as a drop-in replacement for gegl_buffer_set_extent(), which,
in addition to setting the buffer's extent, clears any now-out-of-
bounds tiles, to free memory.
2019-08-13 17:44:10 +03:00
Ell 5798cefe1b app: add gimp_gegl_buffer_dup()
... as a drop-in replacement for gegl_buffer_dup(), which COWs all
tiles of the source buffer, including ones that aren't fully
included within buffer's extent.
2019-07-30 20:32:10 +03:00
Ell ab94251ae9 app: remove gimp_gegl_rectangle_align_to_tile_grid()
... and replace it with gegl_rectangle_align_to_buffer().
2019-07-30 20:32:08 +03:00
Ell f6c4e4912a app: add gimp_gegl_node_is_area_filter_operation()
... which determines if a node is an area filter operation.  If the
node is a meta op, we conservatively return TRUE, as it may involve
an area-filter op.
2019-07-28 12:10:18 +03:00
Ell eb5e473665 app: add gimp_gegl_node_{set,get}_underlying_oepration()
... which allow setting/getting the "underlying operation" node of
a graph node.  For example, GimpDrawableFilter constructs a complex
graph around a given operation node, which would be the underlying
operation of the graph.  This allows querying the properties of the
underlying operation, given only the graph.

In recursive cases, gimp_gegl_node_get_underlying_operation()
returns the most-nested underlying operation; when no underlying
operation has been set, gimp_gegl_node_get_underlying_operation()
returns the input node.
2019-03-27 15:45:55 -04:00
Ell ff13e55c16 app: add gimp_gegl_node_is_source_operation()
... which determines if a node is a source operation.
2019-03-27 15:45:31 -04:00
Ell 918f2e75bd app: add gimp_gegl_node_is_point_operation()
... which takes a GeglNode, and determines if the associated
operation is a point operation.

Use in GimpFilterTool, instead of performing the same check
manually.
2019-02-15 12:38:53 -05:00
Ell 69e5f783c5 app: add gimp_gegl_rectangle_align_to_tile_grid()
... which expands a GeglRectangle, such that it's aligned to the
tile grid of a given GeglBuffer.
2018-12-02 03:10:26 -05:00
Michael Natterer 6938d11716 Issue #1997 - Colors not properly converted to image's color space
Add a Babl space parameter to gimp_gegl_color_new() and all utility
functions using it. Pass NULL if the GimpRGB actually is sRGB, pass
the image's layer space if the color was already converted using
gimp_pickable_srgb_to_image_color() or similar.
2018-08-09 20:04:44 +02:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer 23c3cf7249 app: add gimp_gegl_node_get_format()
which is a wrapper around gegl_operation_get_format().
2016-06-08 00:04:50 +02:00
Michael Natterer cea4ea6cff app: require a text in gimp_gegl_progress_connect()
and simplify and fix the progress callback.
2016-05-11 22:50:33 +02:00
Massimo Valentini 85cb525c7e Bug 766128: Use gegl_operation_progress
instead of reimplementing it in two operations
2016-05-11 19:09:56 +02:00
Michael Natterer 1b71731cb8 app: clean up the GEGL progress code a bit
Includes code from Massimo from bug #763135.
2016-03-23 22:53:09 +01:00
Massimo Valentini b9ba90589a Bug 678085 - Cage tool freezes GIMP
Use a proper "progress" signal instead of a property "notify" one
to update the on-canvas progress widget.

This way the graph is not invalidated while processing it
2016-02-02 12:21:15 +01:00
Michael Natterer a6601d563b app: some GimpProgress cleanup
- change start() and set_text() to use "format" and "..." instead of
  "message", allowing to format progress messages in place
- s/cancelable/cancellable/
- move "cancellable" to be the second argument of start()
2014-07-12 23:45:20 +02:00
Michael Natterer 8aa0019c2e app: clean up inclusion of gegl-plugin.h, mostly removals 2014-06-10 03:13:09 +02:00
Michael Natterer dac7201ead app: follow GEGL propertiy keys convention change
and clean up the magic a bit.
2014-05-16 03:10:01 +02:00
Michael Muré c2da46d810 app: adapt to the transform ops API change in GEGL 2013-06-06 19:58:48 +02:00
Nicolas Robidoux dc19ead94f Add the Nohalo sampler (previously called Lohalo, which now does something different 2012-12-31 15:27:07 -05:00
Michael Natterer 5b86b55e2a app: add gimp_gegl_get_op_enum_type() to get the GType of a gegl enum
and use it in convert-precision-dialog.c
2012-09-24 19:04:01 +02:00
Michael Natterer 373a4e7469 app: completely remove TileManager and friends (base/ and paint-funcs/)
And along with it a lot of stuff like the drawable preview cache, the
gegl tile manager backend, temporary gimp_gegl_buffer_foo() stuff, and
the remaining bits of performance.

The projection is in an evil semi-ported state which makes it work
ok-ish for stuff like layer moving, but absolutely unbearable for
painting, there is also an off-by-one rendering glitch at some zoom
levels.
2012-06-20 21:44:09 +02:00
Michael Natterer 3ad73b3658 libgimpcolor: add GdkPixbuf <-> GeglBuffer utility functions
and update tons of includes in libgimp and app.
2012-05-03 03:37:20 +02:00
Michael Natterer e15702cbe5 app: create gimp-babl-compat.[ch] for gimp_babl_format_get_image_type()
and remove gimp_drawable_type().
2012-05-02 17:51:15 +02:00
Michael Natterer 5167550271 app: add GIMP_PRECISION_U16 and all needed 16 bit integer formats 2012-05-02 17:51:15 +02:00
Michael Natterer a34afd63d8 app: add GIMP_PRECISION_FLOAT and all its formats
Images in that format can't be created currently, the legacy code
crashes royally on it.
2012-05-02 17:51:11 +02:00
Michael Natterer 3af70584d0 app: remove bpp <-> format conversion stuff from gimp-gegl-utils.[ch]
Fix stuff by picking formats as we get data from the "outside", like a
GdkPixbuf, and pass around more proper formats from where we know them.
2012-05-02 17:51:08 +02:00
Michael Natterer ff931e1ded app: move gimp_babl_format_get_base_type() to gimp-babl.[ch]
The GimpImageBaseType enum is going to go away, but a format -> enum
API is going to stay around.
2012-05-02 17:51:08 +02:00
Michael Natterer 03da4fb280 app: make masks use linear, not gamma corrected formats 2012-05-02 17:51:08 +02:00
Michael Natterer 685a48d59a app: move gimp_gegl_buffer_get_temp_buf() to gimptempbuf.[ch] 2012-05-02 17:51:02 +02:00
Michael Natterer 42a5f01be3 app: rename TempBuf to GimpTempBuf 2012-05-02 17:51:00 +02:00
Michael Natterer 690a12f2a7 app: move gimp_temp_buf_create_buffer() to temp-buf.[ch]
TempBuf will soon be promoted to be a core/ citizen.
2012-05-02 17:50:59 +02:00
Michael Natterer 7441a1f6f7 app: turn the TempBuf's "bytes" into "format" and port everything to it 2012-05-02 17:50:59 +02:00
Michael Natterer dd103d227b app: add gimp_babl_format_get_image_type,base_type() 2012-05-02 17:50:57 +02:00
Michael Natterer 72894671d5 app: fix gimp_gegl_color_new() to treat the passed GimpRGB as gamma corrected 2012-05-02 17:50:52 +02:00
Øyvind Kolås 6efd812d08 app: s/GIMP_GEGL_RECT/GEGL_RECTANGLE/
Defining GeglRectangle inline is so useful that it has been added to
GEGL.
2012-05-02 17:50:52 +02:00
Michael Natterer c5c555c834 app: add "take_ownerspip" param to gimp_temp_buf_create_buffer()
and get rid of some more intermediate buffer creation/destruction, and
some redundant temp_buf_free() plus g_object_unref().
2012-05-02 17:50:51 +02:00
Michael Natterer 42713a953b app: don't dup the TempBuf in gimp_temp_buf_create_buffer()
so this function now creates a buffer on a temp_buf is doesn't own.
2012-05-02 17:50:46 +02:00
Øyvind Kolås 76546f7e7c rename lanczos to lohalo
GEGL had a broken lanczos implementation, the lohalo implementation is better
anyways (at least when passed a proper scale matrix).
2012-05-02 17:50:38 +02:00
Øyvind Kolås ee97c1f4ff app: correct usage of babl formats
GIMP was doing evil hacks lying to GEGL about it's pixels being in a linear
color space when they are not. This causes incorrect rendering, makes gaussian
blur misbehave etc.

The legacy projection modes should be implemented using the same 2.2 gamma
formats that are correct to specify for sRGB data. (for proper color
management in higher bitdepths; icc backend babl formats should be used.)

For the old image modes correct babl formats are:

R'G'B'A u8  -  8 bit RGB with 2.2 gamma (sRGB) with linear alpha component
R'G'B' u8   -  8 bit RGB with 2.2 gamma (sRGB)
Y'A u8      -  8 bit Grayscale with 2.2 gamma with linear alpha component
Y' u8       -  8 bit Grayscale with 2.2 gamma

Y u8        -  8 bit linear data, used for masks/channels
A u8        -  8 bit linear alpha

-----------------------------------------------

RGBA float  -     32bit floating point linear light RGB
RaGaBaA float  -  32bit floating point linear light RGB, premultiplied alpha
                  to be used for processing that needs to scale by the alpha,
                  (blurs, resampling etc)
R'G'B'A float  -  32bit floating point sRGB with gamma, to be used where
                  the result depends on being closer to perceptual when
                  processing, can be used a cheaper alternative to CIE Lab
                  based modes.

-----------------------------------------------

The legacy layer modes should use the formats with gamma 2.2 only for loading
and rendering legacy XCF files correctly, in the brave new world compositing
should most likely be done in linear light with "RGBA float" and even better
"RaGaBaA float" like GEGL does for porter duff and other compositing modes.

The ability to chose the legacy layer modes should probably be hidden from the
user unless an old .xcf has been opened.
2012-05-02 17:50:38 +02:00
Michael Natterer 315881065b app: add gimp_gegl_progress_connect()
which connects to notify::progress of the operation inside a node an
updates a GimpProgress accordingly.
2012-05-02 17:50:37 +02:00