summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* reftests: Use the default (aka NGL) renderermodern-testsuiteBenjamin Otte2021-09-161-1/+0
| | | | | All tests pass with the renderer now, so we can remove useof the fallback.
* reftests: XFAIL border-half-pixel testBenjamin Otte2021-09-161-0/+2
| | | | the GL renderer can't deal with non-integers
* reftests: Use colors without rounding errorsBenjamin Otte2021-09-162-5/+5
| | | | | | Color values must be divisible by 15 to be convertible into U8 and U16 values with the same result. 0x80 is not one of these values, so switch it to 0x99.
* rendernodeparser: Handle is_color attribute for glyphsBenjamin Otte2021-09-161-1/+10
|
* ngl: Avoid offscreens in more casesMatthias Clasen2021-09-161-0/+3
| | | | | | | | | | | | | | | We avoid an offscreen if we know the child node can 'handle' the transform. Shadow nodes can if their child node does - either the child node is a text node in which case the shortcuts we take for shadow nodes will work fine with the transform (we just render the text node offset), or the child is not a text node, in which case we render the shadow to an offscreen anyway. This change makes the label-shadows reftest pass with the GL renderer, not by fixing the issue but by avoiding it.
* ngl: Improve shortcuts for shadow nodesMatthias Clasen2021-09-161-9/+12
| | | | | | | | For shadow nodes, we try pretty hard to avoid rendering shadows, and and we have a shortcut that just renders text offset, but we can try harder to do nothing - if the text is offset by zero, we don't need to draw it at all.
* ngl Fix bottom-right border render failureBenjamin Otte2021-09-164-1/+7
| | | | | | The wrong index was used for offsetting the bottom border rect. Test included.
* testsuite: Switch color from khaki to yellowBenjamin Otte2021-09-161-5/+5
| | | | | llvmpipe doesn't loike compositing semitransparent khaki onto solid khaki without rounding errors.
* reftests: Make image-compare use texturesBenjamin Otte2021-09-163-116/+41
| | | | All image comparisons are done on textures now.
* reftests: Use 0.6 instead of 0.5 for alphaBenjamin Otte2021-09-161-5/+5
| | | | See previous commit about rounding
* reftests: Use 0.6 alpha, not 0.5Benjamin Otte2021-09-162-1/+1
| | | | | 0.5 leads to some GL renderers computing 0.5 * 0xFF as 0x7F and others 0x80, while 0.6 * 0xFF (255 is divisible by 5) is always 0x99.
* testsuite: Port compare_render() to use texturesBenjamin Otte2021-09-161-32/+23
|
* tests: Update rendernode test to use texturesBenjamin Otte2021-09-161-18/+22
|
* testuite: Add opacity-overdraw testBenjamin Otte2021-09-163-0/+16
| | | | | | | | Tests that overdrawing of content inside an opacity node happens before the opacity is applied. This is broken in the GL renderer and causes the opacity.ui reftest to fail.
* ngl: Fix opacity handlingMatthias Clasen2021-09-161-9/+64
| | | | | | | | We need to use an offscreen whenever there is overlapping children somewhere in the tree below, just checking the direct child of the opacity node is not enough. Fixes: #4261
* reftests: Use GdkTexture instead of cairo_surface_tBenjamin Otte2021-09-166-32/+90
| | | | | | | | This also switches the rendering code from using gsk_render_node_draw() to gsk_renderer_render_texture(). Some tests are broken with the GL renderer, so this patch forces the Cairo renderer until they get fixed.
* reftests: Make diff pixels always opaqueBenjamin Otte2021-09-161-0/+2
| | | | | We had pixels that did not differ in alpha and we then set 0 alpha difference hich made the pixel invisible. Oops.
* testsuite: remove box-order testBenjamin Otte2021-09-164-505/+0
| | | | | | | | | | The test used to test that GtkBox ordered it's children left-to-right in CSS, no matter the text direction or pack-type. But there is neither a pack-type anymore nor does GTK4 do that. So that test has been broken for yers, it just didn't render anything wrong.
* API: Add gdk_texture_new_from_filename()Benjamin Otte2021-09-162-0/+36
| | | | | There are quite a few places where we can make use of it, in particular in the testsuite and icontheme.
* testsuite: Fix race in texture-threads testBenjamin Otte2021-09-161-3/+9
| | | | Threads are evil, yo.
* gltexture: Fallback in download_float()Benjamin Otte2021-09-161-14/+4
| | | | | | | | GLES only allows downloading float if the texture matches specific criteria and I'm too lazy to determine them, so always fall back. And the custom stride fallback code isn't necessary, because falling back does exactly that step already.
* gltexture: Fix download() for GLESBenjamin Otte2021-09-161-6/+35
| | | | | GLES can't do glGetTexImage(), so implement a version that does glReadPixels() on GLES.
* testsuite: Be more verbose in texture-threads testBenjamin Otte2021-09-161-0/+13
| | | | | The test randomly fails on CI, so try to be more helpful in debugging them.
* Merge branch 'master' into 'master'Matthias Clasen2021-09-161-1/+0
|\ | | | | | | | | Do not require wayland-protocols as dependency in the .pc files See merge request GNOME/gtk!3960
| * Do not require wayland-protocols as dependency in the .pc filemuradm2021-09-161-1/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Basically, I was building some packages on Guix. I figured out that wayland-protocols was listed among propagated-inputs for gtk+ package (gtk-3-24). propagated-inputs holds a list of runtime dependencies, that should be available to any other package that depends on gtk+. While discussing we clarified that wayland-protocols is not runtime dependency. So I moved it to native-inputs of gtk+ package, which means that, this dependency will be available only to gtk+ package and only at build time. Once moved, building of other applications that depening on gtk+ started to fail. Investigation showed that, all .pc (pkg-config) files prepared by gtk+ package, was including: Requires.private: ... wayland-protocols ... Since it becomes requirement, other applications was failing with missing dependency wayland-protocols of dependency gtk+, for instance: -- Checking for module 'gtk+-3.0' -- Package 'wayland-protocols', required by 'gdk-3.0', not found While actually wayland-protocols is not even a build time dependency of application that depends on gtk+. Advertisement of such requirement, is a bit misleading, because one does not need it at runtime, especially applications based on gtk.
* Merge branch 'wip/jimmac/make-toolbar-togglebuttons-visible' into 'master'Matthias Clasen2021-09-161-6/+1
|\ | | | | | | | | | | | | theme: make toggled tbuttons in toolbars visible Closes #4264 See merge request GNOME/gtk!3959
| * theme: make toggled tbuttons in toolbars visibleJakub Steiner2021-09-161-6/+1
|/ | | | | | - do what Alex does in libadwaita Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4264
* Merge branch 'misc-texture-things' into 'master'Matthias Clasen2021-09-163-14/+46
|\ | | | | | | | | Add gdk_texture_new_from_bytes See merge request GNOME/gtk!3958
| * pixbufutils: Simplify functionBenjamin Otte2021-09-151-8/+1
| |
| * texture: Mention download_float in the docsMatthias Clasen2021-09-151-2/+2
| |
| * Add gdk_texture_new_from_bytesMatthias Clasen2021-09-152-4/+43
|/ | | | | Add this new api, and make gdk_texture_new_from_file a wrapper around it.
* Merge branch 'matthiasc/for-master' into 'master'Matthias Clasen2021-09-164-33/+30
|\ | | | | | | | | Fix memorytexture float conversion See merge request GNOME/gtk!3957
| * ngl: Avoid cairo_to_png in debug outputMatthias Clasen2021-09-153-32/+29
| | | | | | | | | | Just use a GL texture and gdk_texture_save_to_png, it was made for this.
| * Fix memorytexture float conversionMatthias Clasen2021-09-151-1/+1
|/ | | | This was silently dropping the alpha in one case.
* Merge branch 'update-readme' into 'master'Matthias Clasen2021-09-151-4/+9
|\ | | | | | | | | Update the README See merge request GNOME/gtk!3956
| * Apply 1 suggestion(s) to 1 file(s)update-readmeMatthias Clasen2021-09-151-1/+1
| |
| * Update the READMEMatthias Clasen2021-09-151-4/+9
|/ | | | | | | Remove the mention of GNU (since that has not been case for a long time, effectively), state that GTK is hosted by the GNOME project, and point to GNOME as a place for donations.
* Update Chinese (China) translationBoyuan Yang2021-09-151-8/+8
|
* Update Chinese (China) translationDz Chen2021-09-151-144/+94
|
* Merge branch 'function-annotations' into 'master'Matthias Clasen2021-09-1415-88/+85
|\ | | | | | | | | Annotate gsk_rounded_rect_is_circular as pure See merge request GNOME/gtk!3952
| * Annotate gtk_get_default_language as constMatthias Clasen2021-09-141-1/+1
| |
| * Annotate gtk_editable_get_chars as mallocMatthias Clasen2021-09-141-1/+1
| |
| * csstypes: Add annotations and inlinesMatthias Clasen2021-09-142-67/+64
| | | | | | | | | | | | Inline _gtk_css_change_for_sibling and _gtk_css_change_for_child, and mark a few other functions as const or malloc.
| * Annotate some builder apis as mallocMatthias Clasen2021-09-141-2/+2
| |
| * Annotate gtk_accelerator_get_default_mod_mask as constMatthias Clasen2021-09-141-1/+1
| |
| * Annotate gsk_cairo_blur_compute_pixels as constMatthias Clasen2021-09-141-1/+1
| |
| * Annotate gdk_rgba_to_string as mallocMatthias Clasen2021-09-141-1/+1
| |
| * Annotate gdk_drag_action_is_unique as constMatthias Clasen2021-09-141-1/+1
| |
| * Annotate gtk_css_tokenizer_get_location as constMatthias Clasen2021-09-141-1/+1
| |
| * cssparser: Mark some functions as pure and mallocMatthias Clasen2021-09-141-7/+7
| |