mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
app: gimp_drawable_update(): optimize a call to
gimp_drawable_get_bounding_box() away.
This commit is contained in:
parent
40ace1016d
commit
9e64535c22
1 changed files with 11 additions and 12 deletions
|
@ -1189,24 +1189,23 @@ gimp_drawable_update (GimpDrawable *drawable,
|
||||||
{
|
{
|
||||||
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
|
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
|
||||||
|
|
||||||
if (width < 0)
|
if (width < 0 || height < 0)
|
||||||
{
|
{
|
||||||
GeglRectangle bounding_box;
|
GeglRectangle bounding_box;
|
||||||
|
|
||||||
bounding_box = gimp_drawable_get_bounding_box (drawable);
|
bounding_box = gimp_drawable_get_bounding_box (drawable);
|
||||||
|
|
||||||
x = bounding_box.x;
|
if (width < 0)
|
||||||
width = bounding_box.width;
|
{
|
||||||
}
|
x = bounding_box.x;
|
||||||
|
width = bounding_box.width;
|
||||||
|
}
|
||||||
|
|
||||||
if (height < 0)
|
if (height < 0)
|
||||||
{
|
{
|
||||||
GeglRectangle bounding_box;
|
y = bounding_box.y;
|
||||||
|
height = bounding_box.height;
|
||||||
bounding_box = gimp_drawable_get_bounding_box (drawable);
|
}
|
||||||
|
|
||||||
y = bounding_box.y;
|
|
||||||
height = bounding_box.height;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (drawable->private->paint_count == 0)
|
if (drawable->private->paint_count == 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue