Commit Graph

4361 Commits

Author SHA1 Message Date
Michael Natterer 3665352ad6 app: change gimp_config_file_backup_on_error() to take a GFile 2014-07-01 20:02:45 +02:00
Michael Natterer 98e7ec090b app: use the new gimp_personal_rc_gfile() in lots of places
and pass the GFile to the newly added GFile-based GimpConfig,
GimpScanner etc. functions. This is starting to make sense now...
2014-07-01 20:02:45 +02:00
Michael Natterer 651c3d56ff app: more filename -> GFile 2014-07-01 15:56:39 +02:00
Michael Natterer a31cb02405 app: return a GFile from gimp_tool_info_build_options_filename()
and rename it to gimp_tool_info_get_options_file().
2014-07-01 15:41:12 +02:00
Michael Natterer 8c8135a881 app: port GimpImageMapTool's settings API from filename to GFile 2014-07-01 15:13:02 +02:00
Michael Natterer 20032907e0 app: use gimp_file_get_utf8_name() in the code ported to GFile earlier 2014-07-01 14:25:37 +02:00
Michael Natterer 113617f526 app: change the GimpData loading API from filename to GFile 2014-07-01 02:30:22 +02:00
Michael Natterer b7c78c5b97 app: use gimp_config_serialize_to_gfile() for dynamics and tool presets 2014-07-01 02:06:44 +02:00
Michael Natterer 6ec5fb80e4 libgimpconfig: add API operating on GFiles instead of filenames
to GimpConfigInterface's wrappers, to GimpConfigWriter and to
GimpScanner.
2014-07-01 01:57:31 +02:00
Michael Natterer 9696e297ac app: turn GimpData's "filename" string into a "file" GFile
One more step, but for now just causes more code in most places to get
to the path inside the GFile.
2014-07-01 01:19:35 +02:00
Michael Natterer f2b265f751 app: more correct code in gimp_projection_chunk_render_iteration()
wasn't broken before, just too obscure.
2014-06-30 23:12:53 +02:00
Michael Natterer 630d74a4c4 app: fix gimp_drawable_merge_filter() to make a copy of the result again
We optimized away so much redundant processing that we now need to
copy the region already processed by the GimpApplicator from its
cache, when it would previously have been created "for free" by all
the redundant processing.
2014-06-30 21:26:01 +02:00
Michael Natterer 48ece1f31d app: revive debug utility function gimp_create_image_from_buffer()
and fix it not to leak the created image.
2014-06-30 21:06:13 +02:00
Michael Henning db4f67048d app: Always return values in non-void functions. 2014-06-29 22:35:34 -04:00
Michael Natterer f4803af808 app: add boolean "cancelable" API to GimpImageMap and gimpdrawable-filter.[ch]
Return booleans indicating success (FALSE == user has canceled), and
allow canceling only in GimpImageMapTool for now.
2014-06-30 01:06:04 +02:00
Michael Natterer 16381c9bf9 app: make gimp_gegl_apply_cached_operation() cancelable via GimpProgress
In gimp_drawable_merge_filter(), use that feature to make filter
applying cancelable. Stop projection rendering first, because we have
to run the event loop manually in order to receive input for
canceling, but we don't want the projection to be constructed from
that manual loop running.
2014-06-30 00:10:25 +02:00
Michael Natterer 3795c597ba app: add gimp_projection_stop_rendering()
which stops a running chunk renderer and moves its remaining
unrendered region back to the projection's dirty region.
2014-06-29 23:57:22 +02:00
Michael Natterer 0e2b8f236d Bug 731362 - Merging layers (outside layer folders)...
...causes layer folders to expand

In gimp_image_remove_layer(), don't use the top element of
image->layer_stack as the new active layer, because it is simply some
arbitrary layer that was previously selected. That stack is only good
for finding the last active layer when returning from the channels
dialog. Instead, let the proper logic run and use the new active item
returned by gimp_item_tree_remove_item(), which is the layer below the
removed one, if any, or the one above it otherwise.
2014-06-29 21:00:03 +02:00
Michael Natterer c0fbbcdac4 app: fix up obsolete comments in GimpImageMap, and reorder members 2014-06-25 18:53:44 +02:00
Michael Natterer 6eba4c716b app: cleanup in GimpImageMap
- don't allow to create a GimpImageMap of an operation without output
- make "region", "mode" and "gamma-hack" settable on a map that
  already has a graph
- don't insert a useless "over" if the operation is a source op
- do the gamma-hack always on formats with alpha, so we don't lose
  intermediate alpha results on source ops
- simplify graph connection a lot
- in GimpImageMap tool, don't recreate the map when reconfiguring
  "region" and "gamma-hack"
2014-06-25 18:16:52 +02:00
Michael Natterer 1ff1c687f4 app: add gimp_image_map_set_mode()
which allows to set opacity and paint_mode on the contained
GimpApplicator.
2014-06-24 20:18:34 +02:00
Michael Henning ef79cfdade app: Make GIMP_PROJECTION_CHUNK_TIME a gdouble
Otherwise, it's immediately rounded to 0.
2014-06-22 10:38:44 -04:00
Michael Natterer f04ec31478 app: don't leak the property keys hash tables of duplicated Gegl paramspecs
This leak never happened because the duplicates are currently never
freed.
2014-06-20 09:00:46 +02:00
Michael Natterer db2ea536da app: add an optional gegl:cache at the output of GimpApplicator
Add "gboolean use_cache" to gimp_applicator_new(). Don't use a cache
anywhere but in GimpImageMap because it incrementally fills that cache
via the projection update. In gimp_drawable_merge_filter(), get that
cache and pass it to gimp_gegl_apply_cached_operation() which then
avoids doing the work twice for the already cached results. Win!
2014-06-18 18:50:53 +02:00
Michael Natterer 3af1fff5af app: make the first image jump to the center of the canvas before rendering
Make GIMP_DISPLAY_SHELL_FILL_IDLE_PRIORITY a bit higher than
GIMP_PROJECTION_IDLE_PRIORITY which is the priority of chunk
rendering.
2014-06-17 23:29:24 +02:00
Michael Natterer 2124ddebe6 app: make gimp_curve_set_n_points and set_n_samples() public API 2014-06-17 20:07:24 +02:00
Michael Natterer f21a649053 app: disable row-fetching optimization in gimppickable-contiguous-region.c
GeglSampler is now much faster. Leave the #ifdefs there for the time
being for benchmarking purposes.
2014-06-17 20:05:05 +02:00
Michael Natterer 35bd3b450d app: use gimp_image_estimate_memsize() in gimp_image_scale_check()
and also improve its result a bit, I think... (whether or not undo
memory should be included here is debatable).
2014-06-15 21:49:38 +02:00
Michael Natterer 57ef7a2959 app: add gimp_image_estimate_memsize()
to be used to estimate an image's memory size at another precision or
size.
2014-06-15 21:40:05 +02:00
Michael Natterer 28e4ae341b app: some cleanup in gimp_template_notify()
- use gimp_babl_mask_format() to get the new image's selection format
- don't call g_object_notify("icon-name"), GimpViewable does that already
2014-06-15 21:29:34 +02:00
Michael Natterer 9f0fde1397 app: add gimp_gegl_pyramid_get_memsize(), used by gimp_projection_get_memsize() 2014-06-15 18:21:05 +02:00
Michael Natterer 02c9dacc8f app: s/GimpPrecision/GimpComponentType/ in gimp_projection_estimate_memsize() 2014-06-14 23:20:52 +02:00
Michael Natterer 909c4b4084 app: add a GimpCpmponentType parameter to GimpDrawable::estimate_memsize()
so we can also estimate converting the drawable to other precisions.
2014-06-14 23:12:22 +02:00
Michael Natterer efd354b733 app: compare gamma-correced colors when finding contiguous regions
This maps threshold changes by moving the mouse more uniformly to the
growing/shrinking of the selected area, and the tools should work
perceptually anyway. Also, it makes things another 10 times as fast on
gamma-corrected drawables.
2014-06-12 23:49:50 +02:00
Michael Natterer 64d9e146d8 app: prefetch entire rows of pixels when finding contiguous regions
Makes the thing about twice as fast (used by fuzzy select, bucket fill)
2014-06-12 23:26:01 +02:00
Michael Natterer 8aa0019c2e app: clean up inclusion of gegl-plugin.h, mostly removals 2014-06-10 03:13:09 +02:00
Michael Henning fd928cde07 app: Return NULL on failure in gimp_drawable_foreground_extract
It is not a void function.
2014-06-03 21:41:04 -04:00
Øyvind Kolås 69b7cda375 app: fix projection and display render chunk-size envvars 2014-06-04 02:07:08 +02:00
Michael Natterer 2c4d5e4391 app: make projection chunk size and display render chunk size configurable
Set the GIMP_PROJECTION_CHUNK_SIZE and GIMP_DISPLAY_RENDER_BUF_SIZE
environment variables to "WIDTHxHEIGHT".
2014-06-04 01:23:41 +02:00
Michael Natterer e2628b9bd0 app: revive gimpdrawable-foreground-extract
Move the extraction graph from the foreground select tool there.
Enable the PDB wrapper again, using default values for now.
Some sytle cleanup in the foreground select tool.
2014-06-03 23:05:23 +02:00
Michael Natterer ee3846cc8b app: make the gimp_drawable_fill*() API symmetric to gimp_edit_fill*() 2014-06-03 14:11:59 +02:00
Michael Natterer 08503835ab app: oops, fix last commit 2014-06-03 14:07:20 +02:00
Michael Natterer 38c86da8e9 app: factor out utility function gimp_get_fill_params()
which returns an error if there is no pattern for GIMP_FILL_PATTERN.
Use it instead of having the same code in 3 variants, and make error
handling consistent with bucket fill.
2014-06-03 14:00:01 +02:00
Michael Natterer 1416743b5c app: use GimpFillType in gimp_drawable_bucket_fill()
GimpBucketFillMode is now tool- and pdb-only.
2014-06-03 01:34:51 +02:00
Øyvind Kolås dcc60e12b6 app: aim for 15fps projection rendering
Allow for more tiles to update, making it possible to see more of the updated
image when tuning paremters / dragging items interactively. Lower frame rate
for more image content is better than 60fps for a small rectangle in the upper
left.
2014-06-03 01:31:02 +02:00
Michael Natterer 425748dab0 libgimpbase, *: rename GimpFillType values: GIMP_FOO_FILL -> GIMP_FILL_FOO
Change all users accordingly and add compat enum values and compat
constants to script-fu and pygimp.
2014-06-03 01:11:32 +02:00
Michael Natterer 069996d75f app: some random code cleanup 2014-06-02 20:17:39 +02:00
Michael Natterer e424b9ebbd app: gimp_channel_new_from_alpha(): use gimp_drawable_get_component_format() 2014-06-02 08:12:48 +02:00
Michael Natterer 8e0563954d app: add gimp_drawable_get_component_format() and _component_index() 2014-06-02 02:31:42 +02:00
Michael Natterer 8424ccbedf app: don't create a temporary GimpChannel in gimp_channel_translate()
a temporary GeglBuffer is enough.
2014-06-02 01:57:17 +02:00