mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 22:20:24 +00:00
Merge branch 'matthiasc/for-main' into 'main'
Disable blur-performance build See merge request GNOME/gtk!7549
This commit is contained in:
commit
1c92f2d963
@ -953,6 +953,16 @@ gtk_css_parser_has_integer (GtkCssParser *self)
|
||||
gtk_css_token_is (token, GTK_CSS_TOKEN_SIGNLESS_INTEGER);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gtk_css_parser_has_percentage (GtkCssParser *self)
|
||||
{
|
||||
const GtkCssToken *token;
|
||||
|
||||
token = gtk_css_parser_get_token (self);
|
||||
|
||||
return gtk_css_token_is (token, GTK_CSS_TOKEN_PERCENTAGE);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_css_parser_has_function:
|
||||
* @self: a `GtkCssParser`
|
||||
|
@ -132,6 +132,7 @@ gboolean gtk_css_parser_has_ident (GtkCssParser
|
||||
gboolean gtk_css_parser_has_url (GtkCssParser *self);
|
||||
gboolean gtk_css_parser_has_number (GtkCssParser *self);
|
||||
gboolean gtk_css_parser_has_integer (GtkCssParser *self);
|
||||
gboolean gtk_css_parser_has_percentage (GtkCssParser *self);
|
||||
gboolean gtk_css_parser_has_function (GtkCssParser *self,
|
||||
const char *name);
|
||||
|
||||
|
@ -1,61 +0,0 @@
|
||||
/* -*- mode: C; c-basic-offset: 2; indent-tabs-mode: nil; -*- */
|
||||
|
||||
#include <gsk/gskcairoblurprivate.h>
|
||||
|
||||
/* This is a hack to work around the fact that this code includes
|
||||
* private headers that inline access to non-exported variables.
|
||||
*/
|
||||
GdkColorState *gdk_default_color_states;
|
||||
|
||||
static void
|
||||
init_surface (cairo_t *cr)
|
||||
{
|
||||
int w = cairo_image_surface_get_width (cairo_get_target (cr));
|
||||
int h = cairo_image_surface_get_height (cairo_get_target (cr));
|
||||
|
||||
cairo_set_source_rgb (cr, 0, 0, 0);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_set_source_rgb (cr, 1, 1, 1);
|
||||
cairo_arc (cr, w/2, h/2, w/2, 0, 2*G_PI);
|
||||
cairo_fill (cr);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
cairo_surface_t *surface;
|
||||
cairo_t *cr;
|
||||
GTimer *timer;
|
||||
double msec;
|
||||
int i, j;
|
||||
int size;
|
||||
|
||||
gdk_default_color_states = gdk_color_state_get_srgb ();
|
||||
|
||||
timer = g_timer_new ();
|
||||
|
||||
size = 2000;
|
||||
|
||||
surface = cairo_image_surface_create (CAIRO_FORMAT_A8, size, size);
|
||||
|
||||
cr = cairo_create (surface);
|
||||
|
||||
/* We do everything three times, first two as warmup */
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
for (i = 1; i < 16; i++)
|
||||
{
|
||||
init_surface (cr);
|
||||
g_timer_start (timer);
|
||||
gsk_cairo_blur_surface (surface, i, GSK_BLUR_X | GSK_BLUR_Y);
|
||||
msec = g_timer_elapsed (timer, NULL) * 1000;
|
||||
if (j == 1)
|
||||
g_print ("Radius %2d: %.2f msec, %.2f kpixels/msec:\n", i, msec, size*size/(msec*1000));
|
||||
}
|
||||
}
|
||||
|
||||
g_timer_destroy (timer);
|
||||
|
||||
return 0;
|
||||
}
|
@ -17,7 +17,6 @@ gtk_tests = [
|
||||
['animated-revealing', ['frame-stats.c', 'variable.c']],
|
||||
['motion-compression'],
|
||||
['scrolling-performance', ['frame-stats.c', 'variable.c']],
|
||||
['blur-performance', ['../gsk/gskcairoblur.c']],
|
||||
['simple'],
|
||||
['video-timer', ['variable.c']],
|
||||
['testaccel'],
|
||||
|
Loading…
Reference in New Issue
Block a user