[gtk+] snapshot: Fix mixup when creating crossfade nodes
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] snapshot: Fix mixup when creating crossfade nodes
- Date: Mon, 2 Oct 2017 13:22:28 +0000 (UTC)
commit 604da889ea077d4d23327340713be32fba4261d0
Author: Timm Bäder <mail baedert org>
Date: Mon Oct 2 15:25:44 2017 +0200
snapshot: Fix mixup when creating crossfade nodes
We need to set the progress on the end node.
gtk/gtksnapshot.c | 25 ++++++++++++-------------
1 files changed, 12 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c
index 3f95678..d846d7b 100644
--- a/gtk/gtksnapshot.c
+++ b/gtk/gtksnapshot.c
@@ -929,7 +929,6 @@ gtk_snapshot_push_cross_fade (GtkSnapshot *snapshot,
...)
{
const GtkSnapshotState *current_state = gtk_snapshot_get_current_state (snapshot);
- GtkSnapshotState *start_state;
GtkSnapshotState *end_state;
char *str;
@@ -944,20 +943,20 @@ gtk_snapshot_push_cross_fade (GtkSnapshot *snapshot,
else
str = NULL;
- start_state = gtk_snapshot_push_state (snapshot,
- str,
- current_state->clip_region,
- current_state->translate_x,
- current_state->translate_y,
- gtk_snapshot_collect_cross_fade_end);
-
end_state = gtk_snapshot_push_state (snapshot,
- g_strdup (str),
- start_state->clip_region,
- start_state->translate_x,
- start_state->translate_y,
- gtk_snapshot_collect_cross_fade_start);
+ str,
+ current_state->clip_region,
+ current_state->translate_x,
+ current_state->translate_y,
+ gtk_snapshot_collect_cross_fade_end);
end_state->data.cross_fade.progress = progress;
+
+ gtk_snapshot_push_state (snapshot,
+ g_strdup (str),
+ end_state->clip_region,
+ end_state->translate_x,
+ end_state->translate_y,
+ gtk_snapshot_collect_cross_fade_start);
}
static GskRenderNode *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]