Gimp/libgimpcolor
Jehan 926d5c6daa app, libgimp*, plug-ins: fix previous commit and add gimp_cairo_surface_get_buffer().
The previous commit was not taking into account usages of
gimp_cairo_surface_create_buffer(), other than the text layer rendering
usage, as it was focused on fixing #14970.

In particular, in other pieces of code, we were using a temporary
GeglBuffer as a way to edit the original Cairo surface but the syncing
back was not happening anymore. So previous commit was breaking all
thumbnails of layers or images, as well as PDF export for all raster
layers.

After some thought, I decided to implement a new function
gimp_cairo_surface_get_buffer() which would do what
gimp_cairo_surface_create_buffer() was doing, but adding a boolean flag
to declare whether or not we were expecting to sync back into the Cairo
surface's data. After all, when we don't need to sync back, better avoid
the useless work of copying possibly huge data.

I also added back the possibility of returning a linear-memory backed
buffer, after some discussion with pippin. Because for very small
surfaces, and if we are indeed looking to sync back into the source
Cairo surface, the advantages of using a linear buffer may still be
worth it, even though it's not true for the general case (where tiled
buffers will be much more efficient). I used 4096 (64^2 because our
current tile dimensions are 64 right now in GIMP), though this number is
kinda random and doesn't matter too much (it doesn't have to be the
square of the tile's width or height). I don't put any info about this
in the new function's documentation because developers should not have
any expectations on the type of buffer they get (only whether or not it
will sync back to the source).

As a consequence of all this, gimp_cairo_surface_create_buffer() has
been deprecated as of GIMP 3.2, though it will still work the same. The
new function will be recommended as a replacement.
2025-11-08 20:34:55 +01:00
..
gimpadaptivesupersample.c libgimpcolor, operations, plug-ins: Replace GimpRGB in GimpAdaptiveSuperSample 2024-09-13 01:12:13 +00:00
gimpadaptivesupersample.h Revert "pdb, libgimp: more #pragma once, and formatting cleanup" 2025-08-14 00:54:55 +02:00
gimpbilinear.c libgimpcolor: Remove unneeded GimpRGB functions 2024-09-08 23:32:54 +00:00
gimpbilinear.h Revert "pdb, libgimp: more #pragma once, and formatting cleanup" 2025-08-14 00:54:55 +02:00
gimpcairo.c app, libgimp*, plug-ins: fix previous commit and add gimp_cairo_surface_get_buffer(). 2025-11-08 20:34:55 +01:00
gimpcairo.h app, libgimp*, plug-ins: fix previous commit and add gimp_cairo_surface_get_buffer(). 2025-11-08 20:34:55 +01:00
gimpcolor-parse.c core, libgimpcolor: CMKY & HSL to float 2024-04-23 13:38:59 +00:00
gimpcolor-private.h app, libgimp*, plug-ins: fix previous commit and add gimp_cairo_surface_get_buffer(). 2025-11-08 20:34:55 +01:00
gimpcolor.c app, app, libgimp*: hide struct for several GParamSpec based off GimpParamSpecObject. 2025-01-24 23:44:43 +01:00
gimpcolor.def app, libgimp*, plug-ins: fix previous commit and add gimp_cairo_surface_get_buffer(). 2025-11-08 20:34:55 +01:00
gimpcolor.h Revert "pdb, libgimp: more #pragma once, and formatting cleanup" 2025-08-14 00:54:55 +02:00
gimpcolormanaged.c
gimpcolormanaged.h Revert "pdb, libgimp: more #pragma once, and formatting cleanup" 2025-08-14 00:54:55 +02:00
gimpcolorprofile.c libgimpcolor: Make GimpColorProfile a final type 2024-07-28 05:28:31 +00:00
gimpcolorprofile.h Revert "pdb, libgimp: more #pragma once, and formatting cleanup" 2025-08-14 00:54:55 +02:00
gimpcolortransform.c libgimpcolor: GimpColorTransform made final. 2024-10-17 22:38:25 +02:00
gimpcolortransform.h Revert "pdb, libgimp: more #pragma once, and formatting cleanup" 2025-08-14 00:54:55 +02:00
gimpcolortypes.h Revert "pdb, libgimp: more #pragma once, and formatting cleanup" 2025-08-14 00:54:55 +02:00
gimppixbuf.c
gimppixbuf.h Revert "pdb, libgimp: more #pragma once, and formatting cleanup" 2025-08-14 00:54:55 +02:00
meson.build Declare gexiv2 dependency on many targets (due to gimpmetadata.h) 2025-10-03 18:31:53 -03:00