Commit 6e2df85e authored by Benjamin Otte's avatar Benjamin Otte
Browse files

Merge branch 'wip/otte/for-master' into 'master'

Wip/otte/for master

Closes #1900

See merge request !854
parents 9d16715e 04da31f5
Pipeline #82684 passed with stages
in 17 minutes and 41 seconds
......@@ -310,6 +310,12 @@ gdk_gl_context_real_begin_frame (GdkDrawContext *draw_context,
}
damage = GDK_GL_CONTEXT_GET_CLASS (context)->get_damage (context);
if (context->old_updated_area[1])
cairo_region_destroy (context->old_updated_area[1]);
context->old_updated_area[1] = context->old_updated_area[0];
context->old_updated_area[0] = cairo_region_copy (region);
cairo_region_union (region, damage);
cairo_region_destroy (damage);
......@@ -341,11 +347,6 @@ gdk_gl_context_real_end_frame (GdkDrawContext *draw_context,
GDK_DRAW_CONTEXT_GET_CLASS (GDK_DRAW_CONTEXT (shared))->end_frame (GDK_DRAW_CONTEXT (shared), painted);
return;
}
if (context->old_updated_area[1])
cairo_region_destroy (context->old_updated_area[1]);
context->old_updated_area[1] = context->old_updated_area[0];
context->old_updated_area[0] = cairo_region_reference (painted);
}
static void
......
......@@ -2260,7 +2260,11 @@ gtk_text_get_pixel_ranges (GtkText *self,
int end_index = g_utf8_offset_to_pointer (text, priv->current_pos) - text;
int real_n_ranges, i;
pango_layout_line_get_x_ranges (line, start_index, end_index, ranges, &real_n_ranges);
pango_layout_line_get_x_ranges (line,
MIN (start_index, end_index),
MAX (start_index, end_index),
ranges,
&real_n_ranges);
if (ranges)
{
......
......@@ -11334,6 +11334,7 @@ gtk_widget_set_surface (GtkWidget *widget,
}
}
static void gtk_widget_render (GtkWidget *, GdkSurface *, const cairo_region_t *);
static gboolean
surface_expose (GdkSurface *surface,
cairo_region_t *region,
......@@ -13010,9 +13011,9 @@ gtk_widget_snapshot (GtkWidget *widget,
gtk_snapshot_append_node (snapshot, priv->render_node);
}
void
static void
gtk_widget_render (GtkWidget *widget,
GdkSurface *surface,
GdkSurface *surface,
const cairo_region_t *region)
{
GtkSnapshot *snapshot;
......
......@@ -314,11 +314,6 @@ gboolean gtk_widget_query_tooltip (GtkWidget *widget,
gboolean keyboard_mode,
GtkTooltip *tooltip);
void gtk_widget_render (GtkWidget *widget,
GdkSurface *surface,
const cairo_region_t *region);
void gtk_widget_snapshot (GtkWidget *widget,
GtkSnapshot *snapshot);
void gtk_widget_adjust_size_request (GtkWidget *widget,
......
......@@ -5,16 +5,6 @@ test_parser = executable('test-css-parser', 'test-css-parser.c',
install: get_option('install-tests'),
install_dir: testexecdir,
dependencies: libgtk_dep)
test('parser', test_parser,
args: [ '--tap', '-k' ],
env: [ 'GIO_USE_VOLUME_MONITOR=unix',
'GSETTINGS_BACKEND=memory',
'GTK_CSD=1',
'G_ENABLE_DIAGNOSTIC=0',
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
],
suite: 'css')
test_data = [
'animation-crash-3.12.css',
......@@ -459,6 +449,24 @@ test_data = [
'value-none.ref.css',
]
foreach testname : test_data
if testname.endswith('.css') and not testname.endswith('.ref.css')
test('parser ' + testname, test_parser,
args: [ '--tap',
'-k',
join_paths(meson.current_source_dir(), testname),
],
env: [ 'GIO_USE_VOLUME_MONITOR=unix',
'GSETTINGS_BACKEND=memory',
'GTK_CSD=1',
'G_ENABLE_DIAGNOSTIC=0',
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
],
suite: 'css')
endif
endforeach
if get_option('install-tests')
conf = configuration_data()
conf.set('libexecdir', gtk_libexecdir)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment