mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 10:20:07 +00:00
Merge branch 'wip/otte/for-master' into 'master'
cssparser: Remove unused argument Closes #4381 See merge request GNOME/gtk!4101
This commit is contained in:
commit
1fa350267f
@ -620,21 +620,28 @@ gdk_broadway_server_upload_texture (GdkBroadwayServer *server,
|
||||
gsize size;
|
||||
int fd;
|
||||
|
||||
id = server->next_texture_id++;
|
||||
|
||||
bytes = gdk_texture_save_to_png_bytes (texture);
|
||||
fd = open_shared_memory ();
|
||||
data = g_bytes_get_data (bytes, &size);
|
||||
|
||||
while (size)
|
||||
id = server->next_texture_id++;
|
||||
|
||||
msg.id = id;
|
||||
msg.offset = 0;
|
||||
msg.size = 0;
|
||||
|
||||
while (msg.size < size)
|
||||
{
|
||||
gssize ret = write (fd, data, size);
|
||||
gssize ret = write (fd, data + msg.size, size - msg.size);
|
||||
|
||||
if (ret <= 0)
|
||||
break;
|
||||
{
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
size -= ret;
|
||||
data += ret;
|
||||
msg.size += ret;
|
||||
}
|
||||
|
||||
g_bytes_unref (bytes);
|
||||
|
@ -1918,7 +1918,7 @@ gsk_render_node_deserialize_from_bytes (GBytes *bytes,
|
||||
gpointer user_data;
|
||||
} error_func_pair = { error_func, user_data };
|
||||
|
||||
parser = gtk_css_parser_new_for_bytes (bytes, NULL, NULL, gsk_render_node_parser_error,
|
||||
parser = gtk_css_parser_new_for_bytes (bytes, NULL, gsk_render_node_parser_error,
|
||||
&error_func_pair, NULL);
|
||||
root = parse_container_node (parser);
|
||||
|
||||
|
@ -2391,7 +2391,7 @@ gsk_transform_parse (const char *string,
|
||||
g_return_val_if_fail (out_transform != NULL, FALSE);
|
||||
|
||||
bytes = g_bytes_new_static (string, strlen (string));
|
||||
parser = gtk_css_parser_new_for_bytes (bytes, NULL, NULL, NULL, NULL, NULL);
|
||||
parser = gtk_css_parser_new_for_bytes (bytes, NULL, NULL, NULL, NULL);
|
||||
|
||||
result = gsk_transform_parser_parse (parser, out_transform);
|
||||
|
||||
|
@ -55,7 +55,6 @@ struct _GtkCssParserBlock
|
||||
static GtkCssParser *
|
||||
gtk_css_parser_new (GtkCssTokenizer *tokenizer,
|
||||
GFile *file,
|
||||
GFile *base_directory,
|
||||
GtkCssParserErrorFunc error_func,
|
||||
gpointer user_data,
|
||||
GDestroyNotify user_destroy)
|
||||
@ -67,11 +66,11 @@ gtk_css_parser_new (GtkCssTokenizer *tokenizer,
|
||||
self->ref_count = 1;
|
||||
self->tokenizer = gtk_css_tokenizer_ref (tokenizer);
|
||||
if (file)
|
||||
self->file = g_object_ref (file);
|
||||
if (base_directory)
|
||||
self->directory = g_object_ref (base_directory);
|
||||
else if (file)
|
||||
self->directory = g_file_get_parent (file);
|
||||
{
|
||||
self->file = g_object_ref (file);
|
||||
self->directory = g_file_get_parent (file);
|
||||
}
|
||||
|
||||
self->error_func = error_func;
|
||||
self->user_data = user_data;
|
||||
self->user_destroy = user_destroy;
|
||||
@ -94,7 +93,7 @@ gtk_css_parser_new_for_file (GFile *file,
|
||||
if (bytes == NULL)
|
||||
return NULL;
|
||||
|
||||
result = gtk_css_parser_new_for_bytes (bytes, file, NULL, error_func, user_data, user_destroy);
|
||||
result = gtk_css_parser_new_for_bytes (bytes, file, error_func, user_data, user_destroy);
|
||||
|
||||
g_bytes_unref (bytes);
|
||||
|
||||
@ -104,7 +103,6 @@ gtk_css_parser_new_for_file (GFile *file,
|
||||
GtkCssParser *
|
||||
gtk_css_parser_new_for_bytes (GBytes *bytes,
|
||||
GFile *file,
|
||||
GFile *base_directory,
|
||||
GtkCssParserErrorFunc error_func,
|
||||
gpointer user_data,
|
||||
GDestroyNotify user_destroy)
|
||||
@ -113,7 +111,7 @@ gtk_css_parser_new_for_bytes (GBytes *bytes,
|
||||
GtkCssParser *result;
|
||||
|
||||
tokenizer = gtk_css_tokenizer_new (bytes);
|
||||
result = gtk_css_parser_new (tokenizer, file, base_directory, error_func, user_data, user_destroy);
|
||||
result = gtk_css_parser_new (tokenizer, file, error_func, user_data, user_destroy);
|
||||
gtk_css_tokenizer_unref (tokenizer);
|
||||
|
||||
return result;
|
||||
|
@ -56,7 +56,6 @@ GtkCssParser * gtk_css_parser_new_for_file (GFile
|
||||
GError **error);
|
||||
GtkCssParser * gtk_css_parser_new_for_bytes (GBytes *bytes,
|
||||
GFile *file,
|
||||
GFile *base_directory,
|
||||
GtkCssParserErrorFunc error_func,
|
||||
gpointer user_data,
|
||||
GDestroyNotify user_destroy);
|
||||
|
@ -365,7 +365,6 @@ gtk_css_scanner_new (GtkCssProvider *provider,
|
||||
|
||||
scanner->parser = gtk_css_parser_new_for_bytes (bytes,
|
||||
file,
|
||||
NULL,
|
||||
gtk_css_scanner_parser_error,
|
||||
scanner,
|
||||
NULL);
|
||||
|
@ -142,7 +142,7 @@ value_from_string (GtkStyleProperty *prop,
|
||||
GtkCssValue *value;
|
||||
|
||||
bytes = g_bytes_new_static (str, strlen (str));
|
||||
parser = gtk_css_parser_new_for_bytes (bytes, NULL, NULL, NULL, NULL, NULL);
|
||||
parser = gtk_css_parser_new_for_bytes (bytes, NULL, NULL, NULL, NULL);
|
||||
value = _gtk_style_property_parse_value (prop, parser);
|
||||
gtk_css_parser_unref (parser);
|
||||
g_bytes_unref (bytes);
|
||||
|
Loading…
Reference in New Issue
Block a user