Commit 1f9d6070 authored by Ari Pollak's avatar Ari Pollak

Imported Upstream version 2.4.3

parent 12749080
2007-12-16 Sven Neumann <sven@gimp.org>
* Made 2.4.3 release.
2007-12-13 Sven Neumann <sven@gimp.org>
Merged from trunk:
* libgimpbase/gimpenv.c (gimp_toplevel_directory) [Win32]: Use
the location of the libgimpbase DLL and not that of the main
executable (which will be the Python interpreter in the case of
python-fu) to determine the top-level GIMP installation
folder. (#502506)
2007-12-12 Sven Neumann <sven@gimp.org>
Merged from trunk:
* app/base/tile-private.h
* app/base/tile-swap.c: Move the LARGE_SEEK and LARGE_TRUNCATE
macros from tile-private.h to tile-swap.c as they aren't used
anywhere else, and the helper function used on Windows was static
in tile-swap.c anyway. (#503124)
2007-12-11 Kevin Cozens <kcozens@cvs.gnome.org>
Merged from trunk:
* plug-ins/script-fu/tinyscheme/scheme.c (get_consecutive_cells):
Fix to prevent reporting out of memory when there should be plenty
of cells still available. See SourceForge bug #1794369.
2007-12-11 Kevin Cozens <kcozens@cvs.gnome.org>
Merged from trunk:
* plug-ins/script-fu/tinyscheme/scheme.c: Applied changes from
official version of TinyScheme which fix is_integer(). See
SourceForge bug #1593861.
2007-12-11 Sven Neumann <sven@gimp.org>
Merged from trunk:
* libgimpbase/gimpwire.c (_gimp_read_read_string): NULL-terminate
all strings coming in over the wire protocol. Should help with bug
#498207.
2007-12-10 Sven Neumann <sven@gimp.org>
Merged from trunk:
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_tool_events): if a device change happens, make
sure we update the new active tool's focus display and modifier
state. Fixes most of bug #493176.
2007-12-10 Bill Skaggs <weskaggs@primate.ucdavis.edu>
Merged from trunk:
* app/paint/gimpheal.c: make the healing brush work properly
when dragged. Fixes bug #492575.
2007-12-07 Bill Skaggs <weskaggs@primate.ucdavis.edu>
Merged from trunk:
* app/display/gimpdisplayshell-draw.c: draw grid correctly when
non-integer spacing is combined with a large offset. Fixes
bug #502374.
* app/core/gimpimage-snap.c: make snapping to grid work when
coord is less than the grid offset.
2007-12-07 Sven Neumann <sven@gimp.org>
Merged from trunk:
* configure.in: fixed indentation of --help output.
2007-12-07 Sven Neumann <sven@gimp.org>
Merged from trunk:
* plug-ins/pygimp/pygimp-colors.c
* plug-ins/pygimp/gimpcolormodule.c: removed calls to PyMem_Free().
2007-12-07 Sven Neumann <sven@gimp.org>
Merged from trunk:
* plug-ins/pygimp/plug-ins/foggify.py: push/pop a context instead
of manually restoring the background color.
2007-12-07 Sven Neumann <sven@gimp.org>
Merged from trunk:
* app/batch.c (batch_run): only show the message about using the
default batch interpreter when running in verbose mode.
2007-12-05 Martin Nordholts <martinn@svn.gnome.org>
Merged from trunk:
* app/actions/tool-options-commands.c
(tool_options_save_to_cmd_callback)
(tool_options_restore_from_cmd_callback): Only care about
GIMP_CONFIG_PARAM_SERIALIZE properties, fixes bug #498948.
2007-12-04 Michael Natterer <mitch@gimp.org>
Merged from trunk:
* app/core/gimpdrawable.[ch]: added new API
gimp_drawable_estimate_memsize() and virtual function
GimpDrawable::estimate_memsize() which estimate the memsize of a
drawable after scaling/resizing.
* app/core/gimplayer.c: implement the virtual function and take
the layer mask into account.
* app/core/gimpimage-item-list.[ch] (gimp_image_item_list_get_list):
added const qualifiers.
* app/core/gimpimage-scale.c (gimp_image_scale_check): use the new
function to correctly estimate the new size instead of scaling the
drawables' memsizes including all constant parts. Fixes bug #329468.
2007-12-02 Sven Neumann <sven@gimp.org>
Merged from trunk:
* plug-ins/common/tiff-load.c (load_image): removed pointless and
untranslated warning.
2007-12-02 Sven Neumann <sven@gimp.org>
Merged from trunk:
* plug-ins/jpeg/jpeg-load.c (jpeg_load_resolution): only set the
resolution if X_density and Y_density are not zero. Otherwise the
default resolution would be used anyway and the user sees an
annoying and confusion warning.
2007-12-01 Martin Nordholts <martinn@svn.gnome.org>
Merged from trunk:
* docs/Makefile.am: Applied patch from Jesper de Jong that removes
an errant leading space in a command. Fixes bug #500826.
2007-11-30 Sven Neumann <sven@gimp.org>
Merged from trunk:
* app/core/gimpprojection.c (gimp_projection_idle_render_init):
raised the idle renderer priority even higher (bug #499150).
2007-11-30 Sven Neumann <sven@gimp.org>
Merged from trunk:
* app/base/tile-manager.c (tile_manager_invalidate_area): if no
tiles have been allocated, there's no need to invalidate any.
Should fix bug #500178.
2007-11-29 Bill Skaggs <weskaggs@primate.ucdavis.edu>
Merged from trunk:
* plug-ins/Lighting/lighting_ui.c: make sure to update bumpmap
when combo is changed. Addresses bug #500317.
2007-11-29 Sven Neumann <sven@gimp.org>
Merged from trunk:
* app/core/gimpprojection.c (gimp_projection_idle_render_init):
raise the priority of the idle renderer to G_PRIORITY_DEFAULT_IDLE.
Should fix bug #499150.
2007-11-28 Sven Neumann <sven@gimp.org>
Merged from trunk:
* app/actions/drawable-commands.c (drawable_flip_cmd_callback):
fixed orientation type used for linked items (bug #499161).
* app/core/gimpdrawable-transform.c
(gimp_drawable_transform_tiles_flip): fixed typo in if condition
and added more sanity checks.
2007-11-26 Sven Neumann <sven@gimp.org>
Merged from trunk:
* plug-ins/common/wmf.c: avoid filename encoding problems by not
using wmf_file_open() but mapping the file into memory with
GMappedFile. Fixes bug #499329.
2007-11-21 Sven Neumann <sven@gimp.org>
* configure.in: bumped version to 2.4.3 (interface age 3).
2007-11-20 Sven Neumann <sven@gimp.org>
* Made 2.4.2 release.
......
......@@ -316,6 +316,7 @@ MMX_EXTRA_CFLAGS = @MMX_EXTRA_CFLAGS@
MNG = @MNG@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
MSGMERGE = @MSGMERGE@
MS_LIB_AVAILABLE_FALSE = @MS_LIB_AVAILABLE_FALSE@
MS_LIB_AVAILABLE_TRUE = @MS_LIB_AVAILABLE_TRUE@
OBJDUMP = @OBJDUMP@
......
......@@ -7,6 +7,40 @@ This is the stable branch of GIMP. No new features are being added
here, just bug-fixes.
Changes in GIMP 2.4.3
=====================
- avoid filename encoding problems in the WMF import plug-in (bug #499329)
- fixed horizontal flipping of linked layers (bug #499161)
- raised the priority of the display idle renderer to improve performance
on Win32 (bug #499150)
- fixed a missing update in the Lighting plug-in UI (bug #500317)
- fixed a potential crash in the projection code (bug #500178)
- fixed a minor Makefile issue (bug #500826)
- removed some pointless warnings from the JPEG and TIFF load plug-ins
- fixed size calculation for the image size warning dialog (bug #329468)
- fixed loading of tool options for the rectangle tools (bug #498948)
- push/pop a context in the Fog filter
- fixed potential crashes in the Python binding
- corrected grid drawing with non-integer spacing (bug #502374)
- fixed grid snapping for coordinates less than the grid offset
- made the healing brush work properly when dragged (bug #492575)
- update tool state when a device change happens (bug #493176)
- improved validation of strings sent over the wire (bug #498207)
- fixed integer check in Script-Fu (bug #498207)
- fixed potential out-of-memory problem in Script-Fu
- fixed compilation on msys/mingw (bug #503124)
- fixed localisation of Python plug-ins on Win32 (bug #502506)
- translation updates (ca, cs, de, gl, it, ko, lt, sv, uk)
Contributors:
Jesper de Jong, Bill Skaggs, Michael Natterer, Sven Neumann,
Martin Nordholts, Kevin Cozens, Tor Lillqvist.
Changes in GIMP 2.4.2
=====================
......@@ -31,6 +65,12 @@ Changes in GIMP 2.4.2
- translation updates (ca, et, it, lt, pt, pt_BR, sr, sv)
Contributors:
Kevin Cozens, Tor Lillqvist, Michael Natterer, Sven Neumann.
Changes in GIMP 2.4.1
=====================
......@@ -50,3 +90,9 @@ Changes in GIMP 2.4.1
- show changes to the rounded corners in the Rectangle Select tool (bug #418284)
- reduced rounding errors in the display render routines (bug #490785)
- translation updates (ca, de, et, lt, mk, pa, sv)
Contributors:
Hans Breuer, Simon Budig, Kevin Cozens, Tor Lillqvist,
Michael Natterer, Sven Neumann, Martin Nordholts, Manish Singh.
......@@ -44,7 +44,7 @@ AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run
esac
done
PKG_PROG_PKG_CONFIG([0.7])
PKG_PROG_PKG_CONFIG([0.16])
no_glib=""
......@@ -917,6 +917,20 @@ AC_SUBST(INTLTOOL_THEME_RULE)
AC_SUBST(INTLTOOL_SERVICE_RULE)
AC_SUBST(INTLTOOL_POLICY_RULE)
# Check the gettext tools to make sure they are GNU
AC_PATH_PROG(XGETTEXT, xgettext)
AC_PATH_PROG(MSGMERGE, msgmerge)
AC_PATH_PROG(MSGFMT, msgfmt)
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
fi
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
fi
# Use the tools built into the package, not the ones that are installed.
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
......@@ -1051,7 +1065,7 @@ AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
# serial 51 Debian 1.5.24-1 AC_PROG_LIBTOOL
# serial 51 Debian 1.5.24-2 AC_PROG_LIBTOOL
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
......
......@@ -377,6 +377,7 @@ MMX_EXTRA_CFLAGS = @MMX_EXTRA_CFLAGS@
MNG = @MNG@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
MSGMERGE = @MSGMERGE@
MS_LIB_AVAILABLE_FALSE = @MS_LIB_AVAILABLE_FALSE@
MS_LIB_AVAILABLE_TRUE = @MS_LIB_AVAILABLE_TRUE@
OBJDUMP = @OBJDUMP@
......
......@@ -332,6 +332,7 @@ MMX_EXTRA_CFLAGS = @MMX_EXTRA_CFLAGS@
MNG = @MNG@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
MSGMERGE = @MSGMERGE@
MS_LIB_AVAILABLE_FALSE = @MS_LIB_AVAILABLE_FALSE@
MS_LIB_AVAILABLE_TRUE = @MS_LIB_AVAILABLE_TRUE@
OBJDUMP = @OBJDUMP@
......
......@@ -268,12 +268,13 @@ drawable_flip_cmd_callback (GtkAction *action,
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_TRANSFORM,
GIMP_ITEM_GET_CLASS (item)->flip_desc);
gimp_item_flip (item, context, (GimpOrientationType) value, axis, FALSE);
gimp_item_flip (item, context,
(GimpOrientationType) value, axis, FALSE);
if (gimp_item_get_linked (item))
{
gimp_item_linked_flip (item, context, (GimpOrientationType) action, axis,
FALSE);
gimp_item_linked_flip (item, context,
(GimpOrientationType) value, axis, FALSE);
gimp_image_undo_group_end (image);
}
......
......@@ -97,7 +97,8 @@ tool_options_save_to_cmd_callback (GtkAction *action,
gchar *name = g_strdup (gimp_object_get_name (GIMP_OBJECT (options)));
gimp_config_sync (G_OBJECT (tool_info->tool_options),
G_OBJECT (options), 0);
G_OBJECT (options),
GIMP_CONFIG_PARAM_SERIALIZE);
gimp_object_take_name (GIMP_OBJECT (options), name);
}
}
......@@ -116,7 +117,8 @@ tool_options_restore_from_cmd_callback (GtkAction *action,
if (options)
gimp_config_sync (G_OBJECT (options),
G_OBJECT (tool_info->tool_options), 0);
G_OBJECT (tool_info->tool_options),
GIMP_CONFIG_PARAM_SERIALIZE);
}
void
......
......@@ -304,6 +304,7 @@ MMX_EXTRA_CFLAGS = @MMX_EXTRA_CFLAGS@
MNG = @MNG@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
MSGMERGE = @MSGMERGE@
MS_LIB_AVAILABLE_FALSE = @MS_LIB_AVAILABLE_FALSE@
MS_LIB_AVAILABLE_TRUE = @MS_LIB_AVAILABLE_TRUE@
OBJDUMP = @OBJDUMP@
......
......@@ -492,6 +492,10 @@ tile_manager_invalidate_area (TileManager *tm,
gint i;
gint j;
/* if no tiles have been allocated, there's no need to invalidate any */
if (! tm->tiles)
return;
for (i = y; i < (y + h); i += (TILE_HEIGHT - (i % TILE_HEIGHT)))
for (j = x; j < (x + w); j += (TILE_WIDTH - (j % TILE_WIDTH)))
{
......
......@@ -21,21 +21,6 @@
#include <sys/types.h>
#ifdef G_OS_WIN32
int gimp_win32_large_truncate (int fd,
gint64 size);
#define LARGE_SEEK(f, o, w) _lseeki64 (f, o, w)
#define LARGE_TRUNCATE(f, s) gimp_win32_large_truncate (f, s)
#else
#define LARGE_SEEK(f, o, t) lseek (f, o, t)
#define LARGE_TRUNCATE(f, s) ftruncate (f, s)
#endif
typedef struct _TileLink TileLink;
struct _TileLink
......
......@@ -120,9 +120,13 @@ static gboolean write_err_msg = TRUE;
#ifdef G_OS_WIN32
#define LARGE_SEEK(f, o, w) _lseeki64 (f, o, w)
#define LARGE_TRUNCATE(f, s) win32_large_truncate (f, s)
static gint
gimp_win32_large_truncate (gint fd,
gint64 size)
win32_large_truncate (gint fd,
gint64 size)
{
if (LARGE_SEEK (fd, size, SEEK_SET) == size &&
SetEndOfFile ((HANDLE) _get_osfhandle (fd)))
......@@ -130,6 +134,12 @@ gimp_win32_large_truncate (gint fd,
else
return -1;
}
#else
#define LARGE_SEEK(f, o, t) lseek (f, o, t)
#define LARGE_TRUNCATE(f, s) ftruncate (f, s)
#endif
......
......@@ -72,8 +72,9 @@ batch_run (Gimp *gimp,
{
batch_interpreter = BATCH_DEFAULT_EVAL_PROC;
g_printerr (_("No batch interpreter specified, using the default "
"'%s'.\n"), batch_interpreter);
if (gimp->be_verbose)
g_printerr (_("No batch interpreter specified, using the default "
"'%s'.\n"), batch_interpreter);
}
}
......
......@@ -395,6 +395,7 @@ MMX_EXTRA_CFLAGS = @MMX_EXTRA_CFLAGS@
MNG = @MNG@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
MSGMERGE = @MSGMERGE@
MS_LIB_AVAILABLE_FALSE = @MS_LIB_AVAILABLE_FALSE@
MS_LIB_AVAILABLE_TRUE = @MS_LIB_AVAILABLE_TRUE@
OBJDUMP = @OBJDUMP@
......
......@@ -310,6 +310,7 @@ MMX_EXTRA_CFLAGS = @MMX_EXTRA_CFLAGS@
MNG = @MNG@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
MSGMERGE = @MSGMERGE@
MS_LIB_AVAILABLE_FALSE = @MS_LIB_AVAILABLE_FALSE@
MS_LIB_AVAILABLE_TRUE = @MS_LIB_AVAILABLE_TRUE@
OBJDUMP = @OBJDUMP@
......
......@@ -366,6 +366,7 @@ MMX_EXTRA_CFLAGS = @MMX_EXTRA_CFLAGS@
MNG = @MNG@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
MSGMERGE = @MSGMERGE@
MS_LIB_AVAILABLE_FALSE = @MS_LIB_AVAILABLE_FALSE@
MS_LIB_AVAILABLE_TRUE = @MS_LIB_AVAILABLE_TRUE@
OBJDUMP = @OBJDUMP@
......
......@@ -112,6 +112,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
}
tile_manager_get_offsets (orig_tiles, &u1, &v1);
u2 = u1 + tile_manager_width (orig_tiles);
v2 = v1 + tile_manager_height (orig_tiles);
......@@ -176,6 +177,7 @@ gimp_drawable_transform_tiles_flip (GimpDrawable *drawable,
orig_width = tile_manager_width (orig_tiles);
orig_height = tile_manager_height (orig_tiles);
orig_bpp = tile_manager_bpp (orig_tiles);
tile_manager_get_offsets (orig_tiles, &orig_x, &orig_y);
new_x = orig_x;
......@@ -195,13 +197,14 @@ gimp_drawable_transform_tiles_flip (GimpDrawable *drawable,
(gdouble) orig_height - axis) + axis);
break;
default:
case GIMP_ORIENTATION_UNKNOWN:
g_return_val_if_reached (NULL);
break;
}
new_tiles = tile_manager_new (new_width, new_height, orig_bpp);
if (clip_result && (new_x != orig_y || new_y != orig_y))
if (clip_result && (new_x != orig_x || new_y != orig_y))
{
guchar bg_color[MAX_CHANNELS];
gint clip_x, clip_y;
......@@ -245,8 +248,9 @@ gimp_drawable_transform_tiles_flip (GimpDrawable *drawable,
if (new_width == 0 && new_height == 0)
return new_tiles;
if (flip_type == GIMP_ORIENTATION_HORIZONTAL)
switch (flip_type)
{
case GIMP_ORIENTATION_HORIZONTAL:
for (i = 0; i < orig_width; i++)
{
pixel_region_init (&srcPR, orig_tiles,
......@@ -257,9 +261,9 @@ gimp_drawable_transform_tiles_flip (GimpDrawable *drawable,
1, new_height, TRUE);
copy_region (&srcPR, &destPR);
}
}
else
{
break;
case GIMP_ORIENTATION_VERTICAL:
for (i = 0; i < orig_height; i++)
{
pixel_region_init (&srcPR, orig_tiles,
......@@ -270,6 +274,10 @@ gimp_drawable_transform_tiles_flip (GimpDrawable *drawable,
new_width, 1, TRUE);
copy_region (&srcPR, &destPR);
}
break;
case GIMP_ORIENTATION_UNKNOWN:
break;
}
return new_tiles;
......@@ -339,6 +347,7 @@ gimp_drawable_transform_tiles_rotate (GimpDrawable *drawable,
orig_width = tile_manager_width (orig_tiles);
orig_height = tile_manager_height (orig_tiles);
orig_bpp = tile_manager_bpp (orig_tiles);
tile_manager_get_offsets (orig_tiles, &orig_x, &orig_y);
switch (rotate_type)
......@@ -371,8 +380,8 @@ gimp_drawable_transform_tiles_rotate (GimpDrawable *drawable,
break;
default:
g_assert_not_reached ();
return NULL;
g_return_val_if_reached (NULL);
break;
}
if (clip_result && (new_x != orig_x || new_y != orig_y ||
......@@ -614,7 +623,8 @@ gimp_drawable_transform_flip (GimpDrawable *drawable,
image = gimp_item_get_image (GIMP_ITEM (drawable));
/* Start a transform undo group */
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_TRANSFORM, Q_("command|Flip"));
gimp_image_undo_group_start (image,
GIMP_UNDO_GROUP_TRANSFORM, Q_("command|Flip"));
/* Cut/Copy from the specified drawable */
orig_tiles = gimp_drawable_transform_cut (drawable, context, &new_layer);
......@@ -629,6 +639,7 @@ gimp_drawable_transform_flip (GimpDrawable *drawable,
gint width, height;
tile_manager_get_offsets (orig_tiles, &off_x, &off_y);
width = tile_manager_width (orig_tiles);
height = tile_manager_height (orig_tiles);
......@@ -698,7 +709,8 @@ gimp_drawable_transform_rotate (GimpDrawable *drawable,
image = gimp_item_get_image (GIMP_ITEM (drawable));
/* Start a transform undo group */
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_TRANSFORM, Q_("command|Rotate"));
gimp_image_undo_group_start (image,
GIMP_UNDO_GROUP_TRANSFORM, Q_("command|Rotate"));
/* Cut/Copy from the specified drawable */
orig_tiles = gimp_drawable_transform_cut (drawable, context, &new_layer);
......@@ -713,6 +725,7 @@ gimp_drawable_transform_rotate (GimpDrawable *drawable,
gint width, height;
tile_manager_get_offsets (orig_tiles, &off_x, &off_y);
width = tile_manager_width (orig_tiles);
height = tile_manager_height (orig_tiles);
......
......@@ -87,7 +87,7 @@ static void gimp_drawable_scale (GimpItem *item,
gint new_offset_x,
gint new_offset_y,
GimpInterpolationType interp_type,
GimpProgress *progress);
GimpProgress *progress);
static void gimp_drawable_resize (GimpItem *item,
GimpContext *context,
gint new_width,
......@@ -108,10 +108,10 @@ static void gimp_drawable_rotate (GimpItem *item,
static void gimp_drawable_transform (GimpItem *item,
GimpContext *context,
const GimpMatrix3 *matrix,
GimpTransformDirection direction,
GimpInterpolationType interpolation_type,
GimpTransformDirection direction,
GimpInterpolationType interpolation_type,
gint recursion_level,
GimpTransformResize clip_result,
GimpTransformResize clip_result,
GimpProgress *progress);
static gboolean gimp_drawable_get_pixel_at (GimpPickable *pickable,
......@@ -124,6 +124,10 @@ static void gimp_drawable_real_update (GimpDrawable *drawable,
gint width,
gint height);
static gint64 gimp_drawable_real_estimate_memsize (const GimpDrawable *drawable,
gint width,
gint height);
static void gimp_drawable_real_set_tiles (GimpDrawable *drawable,
gboolean push_undo,
const gchar *undo_desc,
......@@ -206,6 +210,7 @@ gimp_drawable_class_init (GimpDrawableClass *klass)
klass->update = gimp_drawable_real_update;
klass->alpha_changed = NULL;
klass->estimate_memsize = gimp_drawable_real_estimate_memsize;
klass->invalidate_boundary = NULL;
klass->get_active_components = NULL;
klass->apply_region = gimp_drawable_real_apply_region;
......@@ -614,6 +619,14 @@ gimp_drawable_real_update (GimpDrawable *drawable,
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (drawable));
}
static gint64
gimp_drawable_real_estimate_memsize (const GimpDrawable *drawable,
gint width,
gint height)
{
return (gint64) gimp_drawable_bytes (drawable) * width * height;
}
static void
gimp_drawable_real_set_tiles (GimpDrawable *drawable,
gboolean push_undo,
......@@ -760,6 +773,17 @@ gimp_drawable_real_swap_pixels (GimpDrawable *drawable,
/* public functions */
gint64
gimp_drawable_estimate_memsize (const GimpDrawable *drawable,
gint width,
gint height)
{
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), 0);
return GIMP_DRAWABLE_GET_CLASS (drawable)->estimate_memsize (drawable,
width, height);
}
void
gimp_drawable_configure (GimpDrawable *drawable,