snapshot: Set blend mode directly after pushing state

This is important since _push_state returns a pointer into a GArray
which could be invalidated and point to garbage after the subsequent
push_state call.
This commit is contained in:
Timm Bäder 2017-10-08 08:28:35 +02:00
parent f597de817e
commit 007e4639a8

View File

@ -823,6 +823,7 @@ gtk_snapshot_push_blend (GtkSnapshot *snapshot,
current_state->translate_x, current_state->translate_x,
current_state->translate_y, current_state->translate_y,
gtk_snapshot_collect_blend_top); gtk_snapshot_collect_blend_top);
top_state->data.blend.blend_mode = blend_mode;
gtk_snapshot_push_state (snapshot, gtk_snapshot_push_state (snapshot,
g_strdup (str), g_strdup (str),
@ -830,7 +831,6 @@ gtk_snapshot_push_blend (GtkSnapshot *snapshot,
top_state->translate_x, top_state->translate_x,
top_state->translate_y, top_state->translate_y,
gtk_snapshot_collect_blend_bottom); gtk_snapshot_collect_blend_bottom);
top_state->data.blend.blend_mode = blend_mode;
} }
static GskRenderNode * static GskRenderNode *