Merge branch 'matthiasc/for-main' into 'main'

Update the docs for gtk-xft-rgba

See merge request GNOME/gtk!7000
This commit is contained in:
Matthias Clasen
2024-03-09 04:50:09 +00:00
2 changed files with 29 additions and 23 deletions

View File

@@ -475,6 +475,9 @@ gtk_settings_class_init (GtkSettingsClass *class)
* The type of subpixel antialiasing to use.
*
* The possible values are none, rgb, bgr, vrgb, vbgr.
*
* Note that GSK does not support subpixel antialiasing, and this
* setting has no effect on font rendering in GTK.
*/
pspecs[PROP_XFT_RGBA] = g_param_spec_string ("gtk-xft-rgba", NULL, NULL,
NULL,

View File

@@ -355,33 +355,36 @@ main (int argc, char **argv)
if (!node)
return 1;
/* Render the .node file and download to cairo surface */
rendered_texture = gsk_renderer_render_texture (renderer, node, NULL);
g_assert_nonnull (rendered_texture);
save_image (rendered_texture, node_file, ".out.png");
/* Load the given reference png file */
reference_texture = gdk_texture_new_from_filename (png_file, &error);
if (reference_texture == NULL)
if (plain)
{
g_print ("Error loading reference surface: %s\n", error->message);
g_clear_error (&error);
/* Render the .node file and download to cairo surface */
rendered_texture = gsk_renderer_render_texture (renderer, node, NULL);
g_assert_nonnull (rendered_texture);
save_image (rendered_texture, node_file, ".out.png");
return 0;
}
/* Now compare the two */
diff_texture = reftest_compare_textures (rendered_texture, reference_texture);
if (diff_texture)
{
save_image (diff_texture, node_file, ".diff.png");
g_object_unref (diff_texture);
success = FALSE;
}
/* Load the given reference png file */
reference_texture = gdk_texture_new_from_filename (png_file, &error);
if (reference_texture == NULL)
{
g_print ("Error loading reference surface: %s\n", error->message);
g_clear_error (&error);
save_image (rendered_texture, node_file, ".out.png");
return 0;
}
g_clear_object (&reference_texture);
g_clear_object (&rendered_texture);
/* Now compare the two */
diff_texture = reftest_compare_textures (rendered_texture, reference_texture);
if (diff_texture)
{
save_image (diff_texture, node_file, ".diff.png");
g_object_unref (diff_texture);
success = FALSE;
}
g_clear_object (&reference_texture);
g_clear_object (&rendered_texture);
}
if (flip)
{