summaryrefslogtreecommitdiffstats
path: root/ui/gtk-egl.c
Commit message (Collapse)AuthorAgeFilesLines
* ui: remove support for GTK2 in favour of GTK3Daniel P. Berrangé2018-10-121-6/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GTK2 was deprecated in the 2.12.0 release with: commit b7715af2b31f47060cc5b4be930d16c13be93fa9 Author: Daniel P. Berrange <berrange@redhat.com> Date: Tue Dec 12 11:34:40 2017 +0000 ui: deprecate use of GTK 2.x in favour of 3.x series The GTK 3.0 release was made in Feb, 2011: https://blog.gtk.org/2011/02/10/gtk-3-0-released/ That will soon be 7 years ago, which is enough time to consider the 3.x series widely supported. Thus we deprecate the GTK 2.x support, which will allow us to delete it in the last release of 2018. By this time, GTK 3.x will be almost 8 years old. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20171212113440.16483-1-berrange@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> It is thus able to be removed in the 3.1.0 release. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20180822131554.3398-2-berrange@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Add gles support to egl-helpers, wire up in egl-headless and gtk.Gerd Hoffmann2018-06-261-2/+2
| | | | | | | | | | | | | | | | Add support for OpenGL ES to egl-helpers. Wire up the new option for egl-headless and gtk UIs. egl-headless actually works fine. gtk hits a not-yet implemented code path in libEGL when trying to use gles mode: libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering. (This is mesa 17.2.3). Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Tested-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Message-id: 20180618112141.23398-1-kraxel@redhat.com
* ui/gtk-egl: add cursor_dmabuf supportGerd Hoffmann2018-03-121-1/+39
| | | | | | | | Add support for cursor dmabufs to gtk-egl. Just blend in the cursor (if we have one) when rendering the dmabuf. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180306090951.22932-7-kraxel@redhat.com
* ui/gtk-egl: add scanout_dmabuf supportGerd Hoffmann2018-03-121-0/+23
| | | | | | | Add support for dmabuf scanouts to gtk-egl. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180306090951.22932-6-kraxel@redhat.com
* opengl: move shader init from console-gl.c to shader.cGerd Hoffmann2017-10-171-1/+1
| | | | | | | | | | | | With the upcoming dmabuf support in qemu there will be more users of the shaders than just console-gl.c. So rename ConsoleGLState to QemuGLShader, rename some functions too, move code from console-gl.c to shaders.c. No functional change. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20171010135453.6704-3-kraxel@redhat.com
* egl: misc framebuffer helper improvements.Gerd Hoffmann2017-09-291-2/+2
| | | | | | | | | | | Rename the functions to to say "setup" instead of "create" because they support being called multiple times on the same egl framebuffer. Properly delete unused textures, update function interfaces to support this. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20170927115031.12063-1-kraxel@redhat.com
* gtk: use framebuffer helper functions.Gerd Hoffmann2017-06-211-29/+7Star
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20170614084149.31314-5-kraxel@redhat.com
* egl-helpers: fix display init for x11Gerd Hoffmann2017-05-121-1/+1
| | | | | | | | | | When running on gtk we need X11 platform not mesa platform. Create separate functions for mesa and x11 so we can keep the egl #ifdef mess local to egl-helpers.c Fixes: 0ea1523fb6703aa0dcd65e66b59e96fec028e60a Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20170505104101.30589-4-kraxel@redhat.com
* egl-helpers: drop support for gles and debug loggingGerd Hoffmann2017-05-121-1/+1
| | | | | | | | | | Leftover from the early opengl days. Unused now, so delete the dead code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20170505104101.30589-3-kraxel@redhat.com
* gtk-egl: add scanout_disable supportGerd Hoffmann2017-02-271-5/+10
| | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 1487669841-13668-7-git-send-email-kraxel@redhat.com
* console: rename dpy_gl_scanout to dpy_gl_scanout_textureGerd Hoffmann2017-02-271-5/+5
| | | | | | | | | We'll add a variant which accepts dmabufs soon. Change the name so we can easily disturgish the two variants. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 1487669841-13668-2-git-send-email-kraxel@redhat.com
* virgl: pass whole GL scanout dimensionsMarc-André Lureau2016-07-061-0/+1
| | | | | | | | | | | | | Spice client needs the whole GL texture dimension to be able to show a scanout with a monitor offset (different than +0+0). Furthermore, this fixes a crash when calling surface_{width,height}() after dpy_gfx_replace_surface(con, NULL) was called in virgl_cmd_set_scanout() Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 1465911849-30423-4-git-send-email-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* ui: Clean up includesPeter Maydell2016-02-041-0/+1
| | | | | | | | | | Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1454089805-5470-2-git-send-email-peter.maydell@linaro.org
* gtk/opengl: add opengl context and scanout support (egl)Gerd Hoffmann2015-10-081-8/+123
| | | | | | | | This allows virtio-gpu to render in 3d mode. Uses egl, for gtk versions 3.14 and older. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
* gtk: add opengl support, using eglGerd Hoffmann2015-05-291-0/+141
This adds opengl rendering support to the gtk ui, using egl. It's off by default for now, use 'qemu -display gtk,gl=on' to play with this. Note that gtk got native opengl support with release 3.16. There most likely will be a separate implementation for 3.16+, using the native gtk opengl support. This patch covers older versions (and for the time being 3.16 too, hopefully without rendering quirks). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>