mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 14:20:21 +00:00
broadway: Fix image updates for firefox
For whatever reason we need to assign the function to a variable to be able to call it.
This commit is contained in:
parent
086a577fd1
commit
a4b718da4e
@ -997,12 +997,13 @@ function handleDisplayCommands(display_commands)
|
||||
case DISPLAY_OP_CHANGE_TEXTURE:
|
||||
var image = cmd[1];
|
||||
var texture = cmd[2];
|
||||
// We need a new closure here to have a separate copy of "template" for each iteration...
|
||||
function a_block(t) {
|
||||
// We need a new closure here to have a separate copy of "texture" for each iteration in the onload callback...
|
||||
var block = function(t) {
|
||||
image.src = t.url;
|
||||
// Unref blob url when loaded
|
||||
image.onload = function() { t.unref(); };
|
||||
}(texture);
|
||||
};
|
||||
block(texture);
|
||||
break;
|
||||
case DISPLAY_OP_CHANGE_TRANSFORM:
|
||||
var div = cmd[1];
|
||||
|
Loading…
Reference in New Issue
Block a user