Matthias Clasen
bddf9f9ca3
docs: Cosmetics
...
Do a round of "the the" removal.
2021-10-18 08:35:54 -04:00
Matthias Clasen
5f3062aff0
docs: Cosmetics
2021-10-18 08:35:54 -04:00
Benjamin Otte
cf7ee82755
Merge branch 'fix-dnd-coordinates-on-windows' into 'master'
...
Fix DND coordinates on Windows
See merge request GNOME/gtk!3930
2021-10-16 17:04:26 +00:00
Benjamin Otte
f6e5a33952
Merge branch 'wip/otte/for-master' into 'master'
...
glcontext: Reinstate missing "!"
Closes #4349
See merge request GNOME/gtk!4067
2021-10-16 14:11:00 +00:00
Benjamin Otte
7a50ebaa3f
gdk: Move GdkMemoryFormat enum to gdktypes.h
...
It's used in too many places now.
2021-10-16 15:49:37 +02:00
Benjamin Otte
aa0c22b648
glcontext: Reinstate missing "!"
...
Replacing the return_if_fail()s in commit f584d4f500
lost the
inversions.
Fixes #4349
2021-10-16 15:49:02 +02:00
Benjamin Otte
a7ef4c75ea
Merge branch 'wip/otte/memoryformat' into 'master'
...
Refactor various texture machinery
See merge request GNOME/gtk!4057
2021-10-13 12:51:37 +00:00
Benjamin Otte
9a2e9c5be4
gl: Use gdk_memory_texture_new_from_texture()
...
Way less code to prepare the texture in a proper format.
2021-10-13 14:33:44 +02:00
Benjamin Otte
ddc4a40c33
gl: Refactor texture uploading
...
Don't pass texture + rect, but instead have
gdk_memory_texture_new_subtexture()
and use it to generate subtextures and pass them.
This has the advantage of downloading the a too large texture only once
instead of N times.
2021-10-13 14:33:44 +02:00
Benjamin Otte
52e88ed4c8
gltexture: Determine format in current thread
...
Close widget-factory and observe:
Thread 1:
* acquire main loop
* handle close button
* close window
* dispose video and media stream
* stop GstPlayer
WAIT on pipeline stopping
Thread 2:
* prepare next image in pipeline
* hand image to GtkGstSink
* create GdkTexture from image
* gdk_gl_texture_new() determines format
WAIT on acquiring main loop
Sounds like a deadlock?
Indeed, so don't do that.
2021-10-13 14:33:44 +02:00
Benjamin Otte
5199bebdb5
gl: Move texture uploading to the renderer
...
It does not belong in GdkGLContext, it's a renderer thing.
It's also the only user of that API.
Introduce gdk_gl_context_check_version() private API to make version
checks simpler.
2021-10-13 14:33:44 +02:00
Benjamin Otte
31e9072906
gl: Fix downloading textures *again*
...
It turns out glReadPixels() cannot convert pixels and you are only
allowed to pass a single value into the function arguments. You need to
know which ones or things will explode.
GL is great.
2021-10-13 14:33:44 +02:00
Benjamin Otte
c2368cc605
png: Refactor png saving
...
Do all the memory format shenanigans in GTK now and support all the PNG
formats.
2021-10-13 14:33:44 +02:00
Benjamin Otte
1e7fb52b21
Add memory formats used by libpng
...
Add unpremultiplied high-depth formats. They are used in the real world,
so let's support them.
2021-10-13 14:33:44 +02:00
Sveinn í Felli
71eece2f35
Update Icelandic translation
...
(cherry picked from commit 83b3c7d826
)
2021-10-12 22:48:16 +00:00
Rafael Fontenelle
24b7eec687
Update Brazilian Portuguese translation
...
(cherry picked from commit 4b9260608a
)
2021-10-12 17:34:01 +00:00
Emmanuele Bassi
e98b83dade
Merge branch 'bilelmoussaoui/gtk-snapshot' into 'master'
...
gtk: fix Snapshot.push_shadow annotation
See merge request GNOME/gtk!4060
2021-10-12 11:09:13 +00:00
Bilal Elmoussaoui
257adb4464
gtk: fix Snapshot.push_shadow annotation
2021-10-12 09:00:03 +00:00
Benjamin Otte
7b41738979
png: Do loader conversions in GDK
...
Not inside libpng.
We really want to do them in GL, but we don't have a premultiply step
yet.
2021-10-12 02:06:44 +02:00
Benjamin Otte
b65b64628d
texture: Refactor downloading
...
Pass a format do GdkTextureClass::download(). That way we can download
data in any format.
Also replace gdk_texture_download_texture() with
gdk_memory_texture_from_texture() which again takes a format.
The old functionality is still there for code that wants it: Just pass
gdk_texture_get_format (texture) as the format argument.
2021-10-12 02:06:43 +02:00
Benjamin Otte
d89e82d4a0
Merge branch 'wip/otte/for-master' into 'master'
...
x11: Don't try to move destroyed windows
See merge request GNOME/gtk!4054
2021-10-11 18:36:20 +00:00
Benjamin Otte
f40ce51a13
x11: Don't try to move destroyed windows
...
Fixes BadWindow crashes when the resize happen right when tooltips or
other such transient popups were in the process of being destroyed.
2021-10-11 19:28:59 +02:00
Matthias Clasen
49a64da7ec
Merge branch 'ngl-is-the-new-gl' into 'master'
...
Rename ngl to gl
Closes #4318
See merge request GNOME/gtk!4037
2021-10-11 06:43:41 +00:00
Matthias Clasen
922e6add38
Merge branch 'docs-window-position' into 'master'
...
docs: Mention gtk_window_set_position() being gone
See merge request GNOME/gtk!4048
2021-10-11 06:36:23 +00:00
Emmanuele Bassi
232003b046
Merge branch 'docs-urlmap' into 'master'
...
docs: Add GdkPixbuf to the URL map
See merge request GNOME/gtk!4051
2021-10-10 23:01:39 +00:00
John Ralls
cfadca696b
[gtkimcontextquartz] Accommodate moving GdkSurface widget to private.
...
Fixes macOS build.
2021-10-10 13:16:49 -07:00
Benjamin Otte
5311616ca1
Merge branch 'wip/otte/gles' into 'master'
...
Improve GLES
See merge request GNOME/gtk!4050
2021-10-09 11:59:42 +00:00
Emmanuele Bassi
c7bb4a9678
docs: Add GdkPixbuf to the URL map
...
Allow cross-linking to the GdkPixbuf reference.
2021-10-09 10:55:24 +01:00
Benjamin Otte
e581c148d9
testsuite: Add run for GLES
...
This is supposed to test the most fallback GL stuff, so we might want to
set even more env vars here.
Also enable the run for the Fedora builder in CI.
2021-10-09 06:27:21 +02:00
Benjamin Otte
d4959a95c2
gl: Make sure to set a proper alignment
...
No matter which branch we take, the alignment setting is always the
same.
2021-10-09 05:25:41 +02:00
Benjamin Otte
780ae5232d
gl: Check the stride is a multiple of the bpp
2021-10-09 05:25:41 +02:00
Benjamin Otte
caddea4624
gl: Set stride properly in fallback
2021-10-09 04:44:30 +02:00
Benjamin Otte
27b5dc1452
gl: Fix broken internal format
2021-10-09 04:44:30 +02:00
Benjamin Otte
b4ab9f7b8c
testsuite: Add a test targeting GL upload code
...
Previously, all the tests used the icon upload path using
glTexSubImage2D().
This test uses the custom texture path using glTexImage2D().
2021-10-09 04:44:30 +02:00
Benjamin Otte
e371bd09c1
ngl: Use the right value
...
It's GL_RGBA, not GL_BGRA, or GLES will complain.
2021-10-09 04:44:30 +02:00
Asier Sarasua Garmendia
db167e09c5
Update Basque translation
...
(cherry picked from commit 2492729238
)
2021-10-08 17:44:35 +00:00
Benjamin Otte
27573d9576
Merge branch 'wip/otte/glcontext' into 'master'
...
glcontext: Make GLES vs GL configuration clearer
Closes #4221
See merge request GNOME/gtk!4044
2021-10-08 15:57:08 +00:00
Emmanuele Bassi
0054f8bd74
docs: Mention gtk_window_set_position() being gone
...
People search for it in the migration guide much more than other
GdkSurface and GtkWindow methods.
2021-10-08 12:27:24 +01:00
Benjamin Otte
5c1e402429
Merge branch 'wip/otte/for-master' into 'master'
...
Fix GLES fallout from recent NGL updates
See merge request GNOME/gtk!4046
2021-10-08 09:11:03 +00:00
Benjamin Otte
e974a0412f
glcontext: Add gdk_gl_context_get_api()
...
This is mostly for inspector.
Not sure if we also want to deprecate gdk_gl_context_get_use_es() in
favor of this function.
2021-10-08 03:31:07 +02:00
Benjamin Otte
76420d7146
ngl: Fix glTexImage2D() usage on GLES
...
GLES is very adamant about the format and type matching the internal
format, even if the data is NULL.
2021-10-08 03:31:07 +02:00
Benjamin Otte
f584d4f500
gl: Check allowed APIs in realize()
...
Add gdk_gl_context_is_api_allowed() for backends and make them use it.
Finally, have them return the final API as the return value (or 0 on
error).
And then use that api instead of a use_es boolean flag.
Fixes #4221
2021-10-08 03:31:07 +02:00
Benjamin Otte
8c1f7f7531
glcontext: Deprecate gdk_gl_context_set_use_es()
...
Make it call gdk_gl_context_set_allowed_apis().
Also port callers to use this function.
2021-10-08 03:31:07 +02:00
Benjamin Otte
c6dd3c11fa
glcontext: Add GdkGLContext::allowed-apis
...
This allows specifying the GL APIs in a more comprehensive way than
gdk_gl_context_set_use_es().
2021-10-08 03:31:07 +02:00
Benjamin Otte
3b9967db48
ngl: Compute correct renderformat
...
We want to round up, not down.
2021-10-08 03:31:06 +02:00
Benjamin Otte
4f53645e5d
ngl: fbo 0 has no color attachment
...
Query the backbuffer instead.
2021-10-08 03:31:06 +02:00
Matthias Clasen
b7eb1d3310
gsk: provide an ngl renderer
...
Provide a minimal renderer implementation that fails
in realize. This avoids reusing the same type, which
might give bindings trouble.
2021-10-07 16:46:29 -04:00
Benjamin Otte
222d927e93
Merge branch 'wip/otte/for-master' into 'master'
...
css: Render the background-clip area, not the background-origin
Closes #4324
See merge request GNOME/gtk!4043
2021-10-07 19:11:28 +00:00
Benjamin Otte
30164d5b46
css: Render the background-clip area, not the background-origin
...
Testcase included
Fixes #4324
2021-10-07 19:59:44 +02:00
Matthias Clasen
f868c67429
Skip gsk_ngl type funcs
...
The only type we have with this prefix is the
deprecated duplicate of gsk_gl_renderer_get_type(),
and including it causes some tests to break.
So skip it.
2021-10-07 13:05:53 -04:00