Commit Graph

60941 Commits

Author SHA1 Message Date
Matthias Clasen
c45ed9d76e Merge branch 'zhaoqiang/gtk-To_avoid_compiler_warning' 2020-02-14 08:47:36 -05:00
Matthias Clasen
b6cb1a6eb3 Merge branch 'master-subtract-base-size' into 'master'
gdk: Subtract base size when checking aspect ratio

See merge request GNOME/gtk!1331
2020-02-14 13:19:42 +00:00
Mohammed Sadiq
22a6aaf4c5 Merge branch 'wip/otte/for-master' into 'master'
slicelistmodel: Fix two wrong computations

See merge request GNOME/gtk!1433
2020-02-14 02:39:21 +00:00
Benjamin Otte
d303b5b0eb slicelistmodel: Fix two wrong computations
Both of those are thinkos during math.
Found by Mohammed Sadiq.

Testcases triggering both have been added.
2020-02-14 03:15:22 +01:00
Matthias Clasen
97ec29d3f5 Force-create style contexts in realize
This is necessary as long as style contexts are
required for proper css change tracking.

Fixes #2435
2020-02-13 21:14:01 -05:00
Emmanuele Bassi
eb2e0137fa Merge branch 'master' into 'master'
Fixed OpenGL extension detection for extensions promoted to OpenGL core.

Closes #2428

See merge request GNOME/gtk!1424
2020-02-13 19:53:33 +00:00
David Hogan
0969d06925 Fix detection of OpenGL 3.3 core GL_ARB_timer_query.
Some systems (notably macOS) will not allow enumeration of an extension that has been promoted to core OpenGL for context in use. This change assumes that GL_ARB_timer_query is available on OpenGL 3.3+.

I could not find definitive information on whether GL_ARB_debug_output or GL_KHR_debug have been added to core. Other extensions in use were addressed by https://gitlab.gnome.org/GNOME/gtk/merge_requests/1422 .
2020-02-14 05:41:01 +11:00
David Hogan
c4111dad31 Fixed OpenGL extension detection for extensions promoted to OpenGL core.
For a given OpenGL context, macOS in particular does not support enumeration / detection of OpenGL features that have been promoted to core OpenGL functionality. It is possible other drivers are the same. This change assumes support for GL_ARB_texture_non_power_of_two with OpenGL 2.0+, GL_ARB_texture_rectangle with OpenGL 3.1+ and GL_EXT_framebuffer_blit with OpenGL 3.0+. I failed to find definitive information on whether GL_GREMEDY_frame_terminator has been promoted to OpenGL core, or whether GL_ANGLE_framebuffer_blit or GL_EXT_unpack_subimage have been promoted to core in OpenGL ES. This change results in a significant GtkGLArea performance boost on macOS.

Closes #2428
2020-02-14 05:41:01 +11:00
Emmanuele Bassi
33c6032a10 Merge branch 'ci-flatpak' into 'master'
CI pipeline changes for Flatpak jobs

See merge request GNOME/gtk!1429
2020-02-13 18:10:29 +00:00
Emmanuele Bassi
9a631f2942 ci: Remove G_MESSAGES_DEBUG
We don't need all the debugging messages.
2020-02-13 17:10:19 +00:00
Emmanuele Bassi
9332abfd5b ci: Allow flatpak jobs to fail
We have more accurate CI jobs, now; the Flatpak jobs are nice to have.
2020-02-13 17:09:35 +00:00
Matthias Clasen
883980c48c Merge branch 'gi-fixes' into 'master'
Various fixes for documentation and introspectable API

See merge request GNOME/gtk!1427
2020-02-13 16:38:41 +00:00
Matthias Clasen
2e0af29839 Make release builds mandatory for ci
The tests are now passing in release builds, lets keep
it that way.
2020-02-13 11:21:15 -05:00
Matthias Clasen
cdee2ac173 testsuite: Handle icontheme test better
Skip just the failing tests in release builds.
2020-02-13 10:56:26 -05:00
Matthias Clasen
a66ed7c461 gsk: Fix the compiler warning differently 2020-02-13 10:42:21 -05:00
Emmanuele Bassi
09abb43628 Merge branch 'report-fixes' into 'master'
Fixes for the CI test reports

See merge request GNOME/gtk!1426
2020-02-13 15:04:04 +00:00
Emmanuele Bassi
de1543d4fa ci: Use per-suite anchors
Anchors are global, so they need to be namespaced.
2020-02-13 14:55:39 +00:00
Emmanuele Bassi
5ed3f8d98b ci: Rearrange the results in the HTML report
Move the failures up top, so they stand out.
2020-02-13 14:55:39 +00:00
Emmanuele Bassi
affc7b58fa ci: Fix the HTML anchor in the report 2020-02-13 14:55:39 +00:00
Emmanuele Bassi
2b1e273c53 ci: Use result instead of exit code in the JUnit report
We have a result code coming from Meson which is more accurate than just
looking at the exit code of the unit.
2020-02-13 14:55:39 +00:00
Emmanuele Bassi
1a4d1f8994 ci: Unexpected passes are failures
List them as such in our reports.
2020-02-13 14:55:39 +00:00
Emmanuele Bassi
adc7bf9f25 ci: Put the branch name in the HTML header 2020-02-13 14:55:39 +00:00
Emmanuele Bassi
f4a8edf441 ci: Move HTML report meta from header to article
Makes the bar smaller.
2020-02-13 14:55:39 +00:00
Emmanuele Bassi
3dc6a07f5d ci: Re-enable ccache 2020-02-13 14:55:39 +00:00
Emmanuele Bassi
2a0dfa9670 Remove gtk_style_context_get_parent()
The function was declared and mentioned in the documentation, but it has
been removed in commit 416182a20d.
2020-02-13 14:53:25 +00:00
Emmanuele Bassi
40852ea952 gi: Skip gtk_custom_layout_new()
The whole GtkCustomLayout class is mostly a C convenience API, and
there's no reason why high level languages should use it.
2020-02-13 14:53:25 +00:00
Emmanuele Bassi
32a2a629dd Fix the function name in the gtk-doc stanza
The documentation is still referring to the old function's name.
2020-02-13 14:53:25 +00:00
Emmanuele Bassi
35ac7de140 Match argument name between declaration and definition
Otherwise the documentation and the introspection data will complain.
2020-02-13 14:53:25 +00:00
Emmanuele Bassi
0d354d1dc4 docs: Match the argument name with its declaration 2020-02-13 14:53:25 +00:00
Emmanuele Bassi
cdd7e4c5ec Add a notify function to GdkContentProvider
The callback-based content providers need a GDestroyNotify function to
free the data passed to them on construction, otherwise they are going
to leak.
2020-02-13 14:53:25 +00:00
Matthias Clasen
47f2a6cafd Remove border-half-pixel reftest from xfail
It passes both locally and on ci now.
2020-02-13 09:39:27 -05:00
Matthias Clasen
313c399122 Merge branch 'wip/otte/no-clip-on-draw' into 'master'
Various fixes to rendernode drawing with Cairo

See merge request GNOME/gtk!1425
2020-02-13 13:43:59 +00:00
Benjamin Otte
052d0f6e60 gdk: Remove gdk_cairo_get_clip_rectangle()
The function is fundamentally broken for unbounded surfaces.
If a surface is unbounded, we cannot represent this as a
cairo_rectangle_int_t, and using the return value doesn't work because
it's already used for something else.

In GTK3, unbounded surfaces aren't a problem, but GTK4 uses recording
surfaces.

So better remove that function before we keep using it and using it
wrong.
2020-02-13 07:36:38 +01:00
Benjamin Otte
8f6cab6560 cairoblur: Get rid of gdk_cairo_get_clip_rectangle() call
It's about to be removed.
2020-02-13 07:36:38 +01:00
Benjamin Otte
6203cecf97 gsk: Clip shadow node before push_group()
We want to be sure to push a group that's as small as possible, so we
clip to the child's bounds, because that's the smallest we can go.
2020-02-13 07:36:38 +01:00
Benjamin Otte
6f9f18009c gsk: Add a utility function for rectangles
... and use it.
2020-02-13 07:36:38 +01:00
Benjamin Otte
67610b1242 cairoblur: Move the check for early exit
That means we only have one place where we check all kinds of early
exits.
2020-02-13 07:36:38 +01:00
Benjamin Otte
f0993fc881 rendernode: Avoid rounding errors
Compute the pattern matrix directly instead of transforming the cairo_t.

This ensures that when node_size / texture_size is some obscure floating
point value, we don't get rounding issues from scaling by it once we
draw the texture_size rectangle.

I have no actual failure where this comes in handy, but I had written
the code anyway, so decided to keep it.
2020-02-13 07:36:38 +01:00
Benjamin Otte
75b130ed6b testsuite: Add tests for rounded rect code
... including the bug that was fixed in the parent commit.
2020-02-13 07:36:38 +01:00
Benjamin Otte
77d7c713d4 roundedrect: Fix inlining of graphene functions
graphene treats equality for contains() operations as always matching,
so do the same thing.

This is because unlike integer math, floating point cannot do the "as
close as possible to the point, but not reaching it" operation that
integer does by just subtracting 1.
2020-02-13 07:36:38 +01:00
Benjamin Otte
b0369fc300 roundedrect: Fix gsk_rounded_rect_intersects_rect()
The previous code would return FALSE for
  gsk_rounded_rect_intersects_rect (&rounded, &rounded.bounds);
if rounded was indeed rounded.
2020-02-13 07:36:38 +01:00
Benjamin Otte
16e38701b6 testsuite: Don't use gdk_cairo_get_clip_rectangle()
I want to remove it.
2020-02-13 06:15:44 +01:00
Benjamin Otte
9d8ceb0cb2 testsuite: Don't destroy surfaces that are still used
Coercing the surfaces must not unref the old surface, because the old
surface is going to be saved to a file.
2020-02-13 06:15:44 +01:00
Benjamin Otte
c313a71c3a testsuite: Remove accidentally checked in file
This file should go in the listview branch I guess.
2020-02-13 06:14:05 +01:00
Matthias Clasen
fb84fe7065 Fix flickery hover
Commit 47c44644b1 was a bit overzealous in fixing
compiler warnings. We still need to call collect_textures,
even if we don't need the number that it returns.
2020-02-12 22:45:24 -05:00
Matthias Clasen
9be8f8cf43 Merge branch 'wip/baedert/cairo-paint' into 'master'
Remove cairo_clip() when drawing render nodes

Closes #2431

See merge request GNOME/gtk!1418
2020-02-12 23:44:38 +00:00
Matthias Clasen
14ecc9ec7e Remove unused signal enum values
GtkWidget lost even more signals, so we don't need
these enum values anymore.
2020-02-12 18:25:42 -05:00
Matthias Clasen
073e8dd987 popovermenu: Avoid an uninitialized variable
Pointed out by Timm/clang.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2434
2020-02-12 17:58:41 -05:00
Matthias Clasen
6c6b3d0d11 Merge branch 'ci-pages' into 'master'
Rename the SCSS files for our themes

Closes #2423

See merge request GNOME/gtk!1423
2020-02-12 22:35:58 +00:00
Emmanuele Bassi
2ab9be54fb Rename the SCSS files for our themes
It seems that Meson's gnome.compile_resources() cannot deal with two
files with the same name under different directories, which breaks the
build parallelism because the GResource file ends up not depending on
either the Adwaita or the HighContrast gtk-contained.css file.

This commit only changes the on-disk names of the Adwaita and
HighContrast SCSS files, and the corresponding generated CSS files; the
files in the GResource are going to be aliased to the old file names, to
minimise the breakage. We might want to change the theme entry points at
some later date, if we decide to commit to this naming scheme.

Fixes: #2423

See Meson bug: https://github.com/mesonbuild/meson/issues/6615
2020-02-12 20:22:43 +00:00