Add a new "Swap compression" option to the preferences, allowing
explicit control over the tile-swap compression algorithm.
Previously, control over swap compression was only possible through
GEGL command-line options/environment variables. Since the GEGL
API to list all available compression algorithms is still private
for now, we currently only list the three predefined compression
levels -- "best performance" (the default), "balanced", and "best
compression" -- and a "none" option, to disable compression
altogether. Selecting a custom compression algorithm is possible
by entering its name manually.
This function returns a HINSTANCE (which is technically a pointer if I
understand correctly) for backward compatibility reason. But this is
actually meant to be used as an int only according to the docs.
Yet casting to gint outputs "cast from pointer to integer of different
size" warnings.
We should use intptr_t instead for such cases, since it is a type made
explicitly to hold a pointer as int, hence should always be right on any
platform.
https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutea
When in "show all" mode and canvas padding is disabled, have the
"layers-new-from-visible" action create a new layer from the full
image content, rather than just the canvas content.
... which is similar to gimp_display_shell_get_pickable(), however,
it returns the projection, rather than the image, only when
gimp_display_shell_get_infinite_canvas() is TRUE, i.e., when the
shell is in "show all" mode *and* canvas padding is disabled.
In GimpRectangleSelectTool, when creating the rectangle widget as a
result of clicking inside an existing selection, update the
selection at the click, so that the tool's effects are applied
immediately, without having to further modify the selection.
Some change which happened with the meson port. From my research, this
`#pragma once` is not standard, though it is apparently implemented in
most common compilers.
Also apparently it is based on heuristic, hence it might happen that
file identity fails. Though unsure how often it would happen, if ever, I
don't find this very acceptable (and probably makes for hard-to-debug
bugs).
So let's revert to basic macro guards, stupid and no heuristic, which
don't ever fail and are very easy to read.
In GimpBufferSourceBox, dup the selected buffer (and flush the
pickable to make sure it's fully rendered) instead of using it
directly in the source node. This avoids chunking artifacts when
the buffer's content depends on the filter output, such as when
using the affected layer, or a dependent projection, as input.
Add an option to keep the normal canvas padding in "show all" mode,
instead of extending the checkerboard pattern indefinitely. This
is useful when wanting to show the image content beyond the canvas,
while still keeping the focus on the canvas; further commits will
extend this mode to behave in more view-related cases as if "show
all" wasn't enabled.
Add a new 'View -> Padding Color -> Keep Padding in "Show All"
Mode" toggle, which controls this behavior, with a corresponding
default-value option in the preferences, under "Image Windows ->
Appearance".
and in an attack of madness, changes almost all file plug-in
code to use GFile instead of filenames, which means passing
the GFile down to the bottom and get its filename at the very
end where it's actually needed.
Which means support for GParamSpecObject with value_type ==
G_TYPE_FILE, and converting between GFile and its URI for wire
communication directly above the protocol layer.
This change requires passing a GParamSpec's value type as generic
member of GPParamDef, which in turn makes some members of its
sub-structures obsolete.
In GimpDisplayShell, scale the render cache by the window's scale
factor, and render its content in device pixels, instead of scaled
application pixels. When painting the cache to the screen, unscale
the cairo context by the same factor, so that it's painted in the
native resolution. Note that the various
gimp_display_shell_render_foo() functions still speak in
application pixels, and the scaling happens internally in
gimp_display_shell_render().
Aside from rendering at native resolution on HiDPI, this also fixes
an issue where grid-like display artifacts would appear when the
render cache was not fully validated due to the non-native scaling.
It's an ancient concept from ancient times when we didn't have URIs
and only filenames (not to speak of GFile), and actually even from
before the ancient time before that ancient time when we first had
ones and zeros, and only had zeros.
gimp_plug_in_manager_add_to_db() used to call the PDB in order
to properly register file procedures from pluginrc. This broke
when I moved code to gimpplugin-file.c.
Instead, add gimp_plug_in_manager_add_load_procedure() and
gimp_plug_in_manager_add_save_procedure() and call them from both
gimpplugin-file.c and gimp_plug_in_manager_add_to_db(), which also has
the nice side effect that more GimpFileProcedureGroup logic gets moved
to its place in gimppluginmanager-file.c and less magic is needed in
gimpplugin-file.c.