projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c188f7
)
snapshot: Only normalize rectangle if we have to
author
Timm Bäder
<mail@baedert.org>
Tue, 31 Dec 2019 07:54:42 +0000
(08:54 +0100)
committer
Timm Bäder
<mail@baedert.org>
Tue, 7 Jan 2020 16:27:18 +0000
(17:27 +0100)
We can even replace the comment this way.
gtk/gtksnapshot.c
patch
|
blob
|
history
diff --git
a/gtk/gtksnapshot.c
b/gtk/gtksnapshot.c
index c87ba493f9cae47ea9748ab04cf48e18141f93b6..b1bee0fba9549a4dc3337262a60e799e162696c8 100644
(file)
--- a/
gtk/gtksnapshot.c
+++ b/
gtk/gtksnapshot.c
@@
-587,8
+587,9
@@
gtk_graphene_rect_scale_affine (const graphene_rect_t *rect,
res->origin.y = scale_y * rect->origin.y + dy;
res->size.width = scale_x * rect->size.width;
res->size.height = scale_y * rect->size.height;
- /* necessary when scale_x or scale_y are < 0 */
- graphene_rect_normalize (res);
+
+ if (scale_x < 0 || scale_y < 0)
+ graphene_rect_normalize (res);
}
static void