Commit Graph

952 Commits

Author SHA1 Message Date
Michael Natterer 697572ccc0 app,libgimp*: fix includes to follow our include policy
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
  finally acknowledging the fact that app/ depends on gdk-pixbuf almost
  globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
2013-10-15 01:58:39 +02:00
Michael Natterer 125cf2a2a3 app: use the image instead of the projection for accessing a pickable 2013-09-13 23:29:06 +02:00
Michael Natterer d1795ac204 Bug 700193 - undoing paint tools doesn't update last_coords properly
paint_core->start_coords is in fact the last stroke's endpoint and
only used for storing it in GimpPaintCoreUndo, so the last endpoint
can be resotred for straight-line painting after an undo. Make the
code actually doing that.
2013-07-15 00:41:43 +02:00
Michael Muré c2da46d810 app: adapt to the transform ops API change in GEGL 2013-06-06 19:58:48 +02:00
Michael Natterer ec786816bb */Makefile.am: merge INCLUDES into AM_CPPFLAGS
automake-1.13 finally warns about this anachronism.
2013-06-05 20:48:37 +02:00
Michael Natterer 260c62ed94 app: don't pass "hard-edges" to the transform ops, it's gone 2013-06-04 01:16:13 +02:00
Michael Natterer 741792875e app: add the GimpApplicator back for painting, but make its use optional
Default to using the new code. This is out of pure curiosity how
GEGL changes affect painting with a purely graph-based method.
2013-05-21 18:55:03 +02:00
Daniel Sabo cd91144f9e Faster paintcore
Directly access the brush and paint buffers rather than using
GEGL iterators.

Replicate the relevant parts of GimpApplicator using direct
access.
2013-05-21 04:03:28 -07:00
Loren Merritt 8602fdbecb Bug 699436 - optimize the heal tool
Adjust over-relaxation factor as a function of problem size.  Remove
the second array, and update in-place.  Factor branches and indexing
out of the inner loop, instead precompute a list of pixels inside the
brush mask and what neighbors they have.  Switch from scalar double to
simd float.

Speedup (of the laplace part, excluding gamma correction): 10x-20x,
depending on brush size.
2013-05-10 21:12:25 +02:00
Michael Natterer a0942ae104 Revert "Optimize the heal tool"
This reverts commit d7066a1e2f
because I pushed it accidentially, it still needs some cleanup.
2013-05-02 20:21:10 +02:00
Loren Merritt d7066a1e2f Optimize the heal tool
Adjust over-relaxation factor as a function of problem size.
Remove the second array, and update in-place.
Factor branches and indexing out of the inner loop, instead precompute a list
of pixels inside the brush mask and what neighbors they have.
Switch from scalar double to simd float.

Speedup (of the laplace part, excluding gamma correction): 10x-20x, depending on brush size.
2013-05-02 09:22:25 +02:00
Michael Natterer 9c93df2d4b app: add gimp_drawable_get_linear() which currently always returns FALSE
Add "linear" parameter to GimpApplicator. Pass the drawable's "linear"
to the applicator, and to all calls to gimp_gegl_mode_node_set_mode(),
instead of hardcoding FALSE everywhere.
2013-04-27 08:41:06 +02:00
Michael Natterer 9e1dee9ceb Bug 697862 - heal tool quality regression
Next attempt: don't reset the heal buffer' formats back to bogus.
Instead, read and write them using the right gamma-corrected format.
2013-04-25 15:27:16 +02:00
Loren Merritt c3c4287bdf Bug 697862 - heal tool quality regression
Switch heal tool back to sRGB, which produces better quality than
linear-light. It is, after all, trying to correct for differences in
perceived brightness.
2013-04-23 22:51:43 +02:00
Loren Merritt 3f51850dc4 Bug 697862 - heal tool quality regression
Fix heal tool's convergence threshold.

When we switched from [0,255] to [0,1] pixel range, the amount of numerical
error to tolerate should have been reduced proportionally.
2013-04-21 20:36:19 +02:00
Michael Natterer 69a321ac29 app: turn GimpApplicator into a general-purpose "input + aux -> output" thing
which means adding a lot of proper API. Input, output and aux can be
pads or buffers. Make sure it uses the minimum possible graph in all
cases and doesn't reconfigure nodes unless needed. Port GimpPaintCore
to the new API.
2013-04-14 22:44:21 +02:00
Téo Mazars afa57a507c Bug 641951 - Weird spacing with flat brushes
Take brush orientation into account when computing distances in the
coordinate space of the brush.
2013-03-23 18:23:18 +01:00
Michael Natterer cc6d3bb1eb app: use gegl_node_blit() instead of GeglProcessor in GimpPerspectiveClone
the speedup is hardly measurable, but why not get rid of some overhead
anyway.
2013-03-07 22:15:29 +01:00
Ville Skyttä 6b0d1038cc Bug 692641 - Various spelling fixes 2013-01-27 18:59:02 +01:00
Michael Natterer 0cfdf38726 app: port heal to RGBA float 2012-12-08 22:41:33 +01:00
Michael Natterer 084ba8f84f app: port smudge blending to RGBA float 2012-12-08 22:16:05 +01:00
Daniel Sabo 4c7dc6a494 app: cache values to speed up GEGL paintbrush
Cache values in GimpApplicator to avoid the overhead of gegl_node_set().
Don't reallocate paint_core->paint_buffer if it's already the correct size.
2012-12-08 19:54:24 +01:00
Michael Natterer 908f727f0a Chain up unconditionally in GObject::constructed()
It's supported since GLib 2.28.
2012-11-12 21:51:22 +01:00
Michael Natterer 406c71ae9a Bug 533590 - Perspective clone of a pattern doesn't apply perspective
Fix pattern cloning by adding gegl:tile and gegl:crop. There is
still some glitch that seems to limit the cloning to 3x3 patterns.
2012-11-10 20:49:14 +01:00
Michael Natterer 66bd90c9f2 Bug 533590 - Perspective clone of a pattern doesn't apply perspective
Implement perspective cloning from a pattern. This needed quite some
refactoring, so GimpSourceCore would be able call its get_source()
vfunc also for a GimpClone subclass: essentially this commit adds a
new GimpSourceCore::use_source() vfunc that replaces the
source_options->use_source flag hack, and makes sure the graph used in
GimpPerspectiveClone's get_source() impl reads from the pattern
instead the drawable.

This version does not properly tile the pattern yet, so you can only
clone one copy of the pattern (gegl:tile is not quite doing the right
thing, so it's disabled).
2012-11-01 21:39:14 +01:00
Michael Natterer eb89a545d5 app: move core/gimp-apply-operation.[ch] to gegl/gimp-gegl-apply-operation.[ch] 2012-10-22 16:03:40 +02:00
Michael Natterer 957a4ba2f6 app: port gimp_brush_core_color_area_with_pixmap() to "RGBA float" too
forgetting this one made pixmap brush painting look really funny.
2012-09-26 11:29:28 +02:00
Michael Natterer a5953020ad app: keep GimpBrushCore's solid mask cache around as "Y float"
because that's how we later access it.
2012-09-23 00:01:35 +02:00
Michael Natterer eb2f638e7d app: create the paint tools' paint_buffer as RGBA float
instead of the drawable's native format plus alpha, because we access
these buffers as RGBA float later.
2012-09-21 10:51:23 +02:00
Michael Natterer e8937b2f51 app: port GimpInk mask painting from guchar to float 2012-09-19 00:07:32 +02:00
Michael Natterer 930832d542 app: keep GimpPaintCore->canvas_buffer around as "Y float"
instead of "Y u8" because all operations on it are using float.
2012-09-19 00:06:35 +02:00
Michael Natterer bef35224b3 app: small cleanup in gimp_paint_core_start() 2012-06-11 12:39:42 +02:00
Michael Natterer e254fd7c4d app: actually commit the rest of the patch... 2012-05-26 12:42:52 +02:00
Michael Natterer 6a7173074d app: gimp_gegl_convolve() needs a linear buffer or it will horribly fail 2012-05-23 22:41:14 +02:00
Michael Natterer 1d043b7d4c app: don't include pixel-region.h in gimpsmudge.h 2012-05-21 01:14:39 +02:00
Michael Natterer 4dcd1f3ad4 app: use plain gegl_buffer_new() and _dup(), not the gimp_gegl_ variants
unless the buffers end up being drawable->buffer.
2012-05-20 22:02:59 +02:00
Michael Natterer 198a2f0a51 Bug 675976 - GimpOperationEraseMode doesn't work on layers without alpha
Don't try to "fix" GimpOperationEraseMode because it's not broken. Instead
simply "erase" non-alpha layers with NORMAL mode and the background color.
2012-05-20 17:14:09 +02:00
Michael Natterer 5247f461aa app: remove paint-funcs-types.h 2012-05-19 01:13:21 +02:00
Michael Natterer aee7ddd56d app: remove the !use_gegl case from gimp_drawable_apply_buffer()
and its last three parameters because they were only used for legacy
floating selection projection.
2012-05-19 00:14:51 +02:00
Michael Natterer 1a624d4df4 app: remove many includes of "gegl/gimp-gegl-utils.h" 2012-05-10 23:12:39 +02:00
Michael Henning 2d34092f48 app: Fix heal tool behavior at top and left edge (Bug 568098)
Fixes calculation of the mask buffer's rectangle.
2012-05-10 20:43:32 +03:00
Michael Natterer f8716b3949 app: use a native GeglBuffer in gimp_convolve_motion(), and don't leak it 2012-05-07 02:48:11 +02:00
Michael Natterer 47c495a8f9 app: don't leak all buffers in gimp_brush_core_replace_canvas() 2012-05-07 02:47:39 +02:00
Michael Natterer 5738c866a1 app: rename gimp_gegl_combine_mask() to gimp_gegl_combine_mask_weird()
because it is.
2012-05-06 22:51:11 +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 a3a62b4546 app: add shortcut functions gimp_dynamics_get_foo_value()
and use them for simple use cases instead of dynamics_get_output() and
output_get_foo_value().
2012-05-02 17:51:19 +02:00
Michael Natterer 46ce18f994 app: don't disable perspective clone on indexed drawables any longer 2012-05-02 17:51:19 +02:00
Michael Natterer f857f1f53f app: fold the foo_to_bar_buffer() functions into their callers
They contained a single function call now.
2012-05-02 17:51:12 +02:00
Michael Natterer 4772d3e832 app: add gimp_gegl_combine_mask() and use it in GimpPaintCore 2012-05-02 17:51:12 +02:00
Michael Natterer c07790fa54 app: add gimp_gegl_apply_mask() and use it in GimpPaintCore 2012-05-02 17:51:12 +02:00