mirror of https://github.com/GNOME/gimp.git
app: add gimp_image_invalidate_all()
... which invalidates the entire image. This replaces all calls to gimp_image_invalidate() with the full canvas size, since the image content can now be larger than the canvas.
This commit is contained in:
parent
7f629a630c
commit
1f9d0d275c
|
@ -306,10 +306,7 @@ debug_benchmark_projection (GimpDisplay *display)
|
||||||
|
|
||||||
GIMP_TIMER_START ();
|
GIMP_TIMER_START ();
|
||||||
|
|
||||||
gimp_image_invalidate (image,
|
gimp_image_invalidate_all (image);
|
||||||
0, 0,
|
|
||||||
gimp_image_get_width (image),
|
|
||||||
gimp_image_get_height (image));
|
|
||||||
gimp_projection_flush_now (projection, TRUE);
|
gimp_projection_flush_now (projection, TRUE);
|
||||||
|
|
||||||
GIMP_TIMER_END ("Validation of the entire projection");
|
GIMP_TIMER_END ("Validation of the entire projection");
|
||||||
|
|
|
@ -1325,10 +1325,7 @@ gimp_image_real_colormap_changed (GimpImage *image,
|
||||||
if (gimp_image_get_base_type (image) == GIMP_INDEXED)
|
if (gimp_image_get_base_type (image) == GIMP_INDEXED)
|
||||||
{
|
{
|
||||||
/* A colormap alteration affects the whole image */
|
/* A colormap alteration affects the whole image */
|
||||||
gimp_image_invalidate (image,
|
gimp_image_invalidate_all (image);
|
||||||
0, 0,
|
|
||||||
gimp_image_get_width (image),
|
|
||||||
gimp_image_get_height (image));
|
|
||||||
|
|
||||||
gimp_item_stack_invalidate_previews (GIMP_ITEM_STACK (private->layers->container));
|
gimp_item_stack_invalidate_previews (GIMP_ITEM_STACK (private->layers->container));
|
||||||
}
|
}
|
||||||
|
@ -3055,10 +3052,7 @@ gimp_image_set_component_visible (GimpImage *image,
|
||||||
gimp_image_signals[COMPONENT_VISIBILITY_CHANGED], 0,
|
gimp_image_signals[COMPONENT_VISIBILITY_CHANGED], 0,
|
||||||
channel);
|
channel);
|
||||||
|
|
||||||
gimp_image_invalidate (image,
|
gimp_image_invalidate_all (image);
|
||||||
0, 0,
|
|
||||||
gimp_image_get_width (image),
|
|
||||||
gimp_image_get_height (image));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3167,6 +3161,20 @@ gimp_image_invalidate (GimpImage *image,
|
||||||
GIMP_IMAGE_GET_PRIVATE (image)->flush_accum.preview_invalidated = TRUE;
|
GIMP_IMAGE_GET_PRIVATE (image)->flush_accum.preview_invalidated = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_image_invalidate_all (GimpImage *image)
|
||||||
|
{
|
||||||
|
const GeglRectangle *bounding_box;
|
||||||
|
|
||||||
|
g_return_if_fail (GIMP_IS_IMAGE (image));
|
||||||
|
|
||||||
|
bounding_box = &GIMP_IMAGE_GET_PRIVATE (image)->bounding_box;
|
||||||
|
|
||||||
|
gimp_image_invalidate (image,
|
||||||
|
bounding_box->x, bounding_box->y,
|
||||||
|
bounding_box->width, bounding_box->height);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_image_guide_added (GimpImage *image,
|
gimp_image_guide_added (GimpImage *image,
|
||||||
GimpGuide *guide)
|
GimpGuide *guide)
|
||||||
|
|
|
@ -253,6 +253,7 @@ void gimp_image_invalidate (GimpImage *image,
|
||||||
gint y,
|
gint y,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
void gimp_image_invalidate_all (GimpImage *image);
|
||||||
void gimp_image_guide_added (GimpImage *image,
|
void gimp_image_guide_added (GimpImage *image,
|
||||||
GimpGuide *guide);
|
GimpGuide *guide);
|
||||||
void gimp_image_guide_removed (GimpImage *image,
|
void gimp_image_guide_removed (GimpImage *image,
|
||||||
|
|
|
@ -756,9 +756,7 @@ file_open_sanitize_image (GimpImage *image,
|
||||||
* layers, this is needed in case something triggers projection or
|
* layers, this is needed in case something triggers projection or
|
||||||
* image preview creation before all layers are loaded, see bug #767663.
|
* image preview creation before all layers are loaded, see bug #767663.
|
||||||
*/
|
*/
|
||||||
gimp_image_invalidate (image, 0, 0,
|
gimp_image_invalidate_all (image);
|
||||||
gimp_image_get_width (image),
|
|
||||||
gimp_image_get_height (image));
|
|
||||||
|
|
||||||
/* Make sure all image states are up-to-date */
|
/* Make sure all image states are up-to-date */
|
||||||
gimp_image_flush (image);
|
gimp_image_flush (image);
|
||||||
|
|
Loading…
Reference in New Issue