[gtk/wip/baedert/gl-rework] cssimage: Skip is_computed images
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/gl-rework] cssimage: Skip is_computed images
- Date: Mon, 20 Jan 2020 09:42:25 +0000 (UTC)
commit 1a010b2c325326c15a1f9be46ff42d62f1657731
Author: Timm Bäder <mail baedert org>
Date: Mon Jan 20 10:35:21 2020 +0100
cssimage: Skip is_computed images
Not sure if this isn't potentially slower, but alas.
gtk/gtkcssimage.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkcssimage.c b/gtk/gtkcssimage.c
index 4b9c781d80..3179031f9a 100644
--- a/gtk/gtkcssimage.c
+++ b/gtk/gtkcssimage.c
@@ -184,6 +184,9 @@ _gtk_css_image_compute (GtkCssImage *image,
gtk_internal_return_val_if_fail (GTK_IS_CSS_STYLE (style), NULL);
gtk_internal_return_val_if_fail (parent_style == NULL || GTK_IS_CSS_STYLE (parent_style), NULL);
+ if (gtk_css_image_is_computed (image))
+ return g_object_ref (image);
+
klass = GTK_CSS_IMAGE_GET_CLASS (image);
return klass->compute (image, property_id, provider, style, parent_style);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]