app: s/GimpPrecision/GimpComponentType/ in gimp_projection_estimate_memsize()

This commit is contained in:
Michael Natterer 2014-06-14 23:20:52 +02:00
parent 909c4b4084
commit 02c9dacc8f
5 changed files with 13 additions and 13 deletions

View File

@ -839,9 +839,7 @@ gimp_group_layer_estimate_memsize (const GimpDrawable *drawable,
base_type = gimp_drawable_get_base_type (drawable);
memsize += gimp_projection_estimate_memsize (base_type,
gimp_babl_precision (component_type,
FALSE),
memsize += gimp_projection_estimate_memsize (base_type, component_type,
width, height);
return memsize +

View File

@ -316,13 +316,13 @@ gimp_image_scale_check (const GimpImage *image,
scalable_size +=
gimp_projection_estimate_memsize (gimp_image_get_base_type (image),
gimp_image_get_precision (image),
gimp_image_get_component_type (image),
gimp_image_get_width (image),
gimp_image_get_height (image));
scaled_size +=
gimp_projection_estimate_memsize (gimp_image_get_base_type (image),
gimp_image_get_precision (image),
gimp_image_get_component_type (image),
new_width, new_height);
GIMP_LOG (IMAGE_SCALE,

View File

@ -304,10 +304,10 @@ gimp_projection_get_memsize (GimpObject *object,
/**
* gimp_projection_estimate_memsize:
* @type: the projectable's base type
* @precision: the projectable's precision
* @width: projection width
* @height: projection height
* @type: the projectable's base type
* @component_type: the projectable's component type
* @width: projection width
* @height: projection height
*
* Calculates a rough estimate of the memory that is required for the
* projection of an image with the given @width and @height.
@ -316,7 +316,7 @@ gimp_projection_get_memsize (GimpObject *object,
**/
gint64
gimp_projection_estimate_memsize (GimpImageBaseType type,
GimpPrecision precision,
GimpComponentType component_type,
gint width,
gint height)
{
@ -326,7 +326,9 @@ gimp_projection_estimate_memsize (GimpImageBaseType type,
if (type == GIMP_INDEXED)
type = GIMP_RGB;
format = gimp_babl_format (type, precision, TRUE);
format = gimp_babl_format (type,
gimp_babl_precision (component_type, FALSE),
TRUE);
bytes = babl_format_get_bytes_per_pixel (format);
/* The pyramid levels constitute a geometric sum with a ratio of 1/4. */

View File

@ -68,7 +68,7 @@ void gimp_projection_flush_now (GimpProjection *proj);
void gimp_projection_finish_draw (GimpProjection *proj);
gint64 gimp_projection_estimate_memsize (GimpImageBaseType type,
GimpPrecision precision,
GimpComponentType component_type,
gint width,
gint height);

View File

@ -343,7 +343,7 @@ gimp_template_notify (GObject *object,
private->initial_size +=
gimp_projection_estimate_memsize (private->base_type,
private->precision,
gimp_babl_component_type (private->precision),
private->width, private->height);
if (! strcmp (pspec->name, "icon-name"))