profile/ivi/qtwayland.git
13 years agoPrevented crash due to dangling pointer in QWaylandInputDevice.
Samuel Rødal [Fri, 8 Apr 2011 11:40:26 +0000 (13:40 +0200)]
Prevented crash due to dangling pointer in QWaylandInputDevice.

When a QWaylandWindow is destroyed we need to make sure it's not still
referenced by QWaylandInputDevice.

13 years agoWayland: Add license headers to new files
Jørgen Lind [Thu, 7 Apr 2011 16:02:15 +0000 (18:02 +0200)]
Wayland: Add license headers to new files

13 years agoWayland: Add a egl xcomposite backend
Jørgen Lind [Thu, 7 Apr 2011 15:54:23 +0000 (17:54 +0200)]
Wayland: Add a egl xcomposite backend

13 years agoMade wayland plugin single-threaded, yay :)
Samuel Rødal [Thu, 7 Apr 2011 14:25:02 +0000 (16:25 +0200)]
Made wayland plugin single-threaded, yay :)

Not calling QApplication::processEvents() in qt_init any more, and not
using a write socket notifier to send data over the wayland protocol.

13 years agoWayland: Fix xpixmap_glx readback after multi threading
Jørgen Lind [Thu, 7 Apr 2011 11:57:03 +0000 (13:57 +0200)]
Wayland: Fix xpixmap_glx readback after multi threading

13 years agoLighthouse: Implement xcomposite extension for wayland
Jørgen Lind [Wed, 6 Apr 2011 08:16:51 +0000 (10:16 +0200)]
Lighthouse: Implement xcomposite extension for wayland

13 years agoAfter we make the QPlatformIntegration process events
Jørgen Lind [Thu, 31 Mar 2011 13:13:28 +0000 (15:13 +0200)]
After we make the QPlatformIntegration process events

13 years agoLighthouse: Make wayland event handling happen in a separate thread
Jørgen Lind [Thu, 31 Mar 2011 13:58:46 +0000 (15:58 +0200)]
Lighthouse: Make wayland event handling happen in a separate thread

13 years agoqFatal() if no connection to wayland is available
Harald Fernengel [Wed, 6 Apr 2011 08:39:40 +0000 (10:39 +0200)]
qFatal() if no connection to wayland is available

abort here is the only thing that makes sense, otherwise, we'll get
crashes all over Qt.

Reviewed-by: Jørgen Lind
13 years agoMake sure to delete wayland surface when QWaylandWindow is destroyed.
Samuel Rødal [Tue, 5 Apr 2011 08:12:45 +0000 (10:12 +0200)]
Make sure to delete wayland surface when QWaylandWindow is destroyed.

13 years agoImplement QWaylandIntegration::hasOpenGL().
Samuel Rødal [Tue, 5 Apr 2011 07:38:46 +0000 (09:38 +0200)]
Implement QWaylandIntegration::hasOpenGL().

13 years agoLighthouse: Add drawable bit to the glx config selection rutine
Jørgen Lind [Mon, 4 Apr 2011 10:19:57 +0000 (12:19 +0200)]
Lighthouse: Add drawable bit to the glx config selection rutine

So that we can use the same thing when creating glx pixmaps

13 years agoWayland: Allways have a userPtr for QWaylandWindow
Jørgen Lind [Mon, 4 Apr 2011 10:13:48 +0000 (12:13 +0200)]
Wayland: Allways have a userPtr for QWaylandWindow

So that we can use it without having to check for 0 in input handling

Conflicts:

src/plugins/platforms/wayland/qwaylandinputdevice.cpp

13 years agoFixed compilation of wayland plugin when there's no GL support.
Samuel Rødal [Fri, 1 Apr 2011 12:26:42 +0000 (14:26 +0200)]
Fixed compilation of wayland plugin when there's no GL support.

13 years agoFixed typo.
Samuel Rødal [Fri, 25 Mar 2011 11:49:40 +0000 (12:49 +0100)]
Fixed typo.

13 years agoLighthouse: Wayland: Fix the readback for the glContext in the egl
Jørgen Lind [Fri, 25 Mar 2011 07:32:57 +0000 (08:32 +0100)]
Lighthouse: Wayland: Fix the readback for the glContext in the egl

backend

13 years agoLighthouse: Wayland: Print out what platformbackend we are using
Jørgen Lind [Fri, 25 Mar 2011 07:23:53 +0000 (08:23 +0100)]
Lighthouse: Wayland: Print out what platformbackend we are using

13 years agoLighthouse: Move glx common code into shared files
Jørgen Lind [Thu, 24 Mar 2011 14:25:15 +0000 (15:25 +0100)]
Lighthouse: Move glx common code into shared files

13 years agoLighthouse: Wayland: Make QGLWidget work with the glx integration
Jørgen Lind [Thu, 24 Mar 2011 10:19:44 +0000 (11:19 +0100)]
Lighthouse: Wayland: Make QGLWidget work with the glx integration

Still missing same code for egl integration

13 years agoAdded missing -lX11 to xpixmap_glx wayland integration.
Samuel Rødal [Thu, 24 Mar 2011 09:35:24 +0000 (10:35 +0100)]
Added missing -lX11 to xpixmap_glx wayland integration.

13 years agoLighthouse: Wayland. Added glx backend for gl integration
Jørgen Lind [Thu, 24 Mar 2011 08:57:38 +0000 (09:57 +0100)]
Lighthouse: Wayland. Added glx backend for gl integration

13 years agoLighthouse: Wayland Fix naming bug in the glintegration
Jørgen Lind [Wed, 23 Mar 2011 16:11:28 +0000 (17:11 +0100)]
Lighthouse: Wayland Fix naming bug in the glintegration

13 years agoLighthouse: Wayland: Added a xpixmap readback glcontext
Jørgen Lind [Wed, 23 Mar 2011 15:57:11 +0000 (16:57 +0100)]
Lighthouse: Wayland: Added a xpixmap readback glcontext

It uses a x11 pixmap to render all gl content into, then reads it back
using glReadPixels. Then it sends it over the wire like any other shm
surface.

13 years agoLighthouse: Wayland: Move the frame throttling into the platform window
Jørgen Lind [Wed, 23 Mar 2011 08:04:40 +0000 (09:04 +0100)]
Lighthouse: Wayland: Move the frame throttling into the platform window

This is only for the shm case

13 years agoLighthouse: Wayland, implement gl_integration
Jørgen Lind [Wed, 23 Mar 2011 06:01:56 +0000 (07:01 +0100)]
Lighthouse: Wayland, implement gl_integration

13 years agoLighthouse: Remove drm hack in pro file
Jørgen Lind [Tue, 22 Mar 2011 07:41:49 +0000 (08:41 +0100)]
Lighthouse: Remove drm hack in pro file

13 years agoFixup license headers in Lighthouse plugins
Jørgen Lind [Thu, 17 Mar 2011 11:32:41 +0000 (12:32 +0100)]
Fixup license headers in Lighthouse plugins

13 years agoFix race condition in the non-GL case
Paul Olav Tvete [Mon, 14 Mar 2011 15:55:19 +0000 (16:55 +0100)]
Fix race condition in the non-GL case

Make sure to also flush output when waiting for an ack from the
compositor, in case we haven't sent the frame request yet.

Reviewed-by: Jørgen
13 years agoLighthouse: Fix a block for wayland with gl support
Benjamin Franzke [Thu, 3 Mar 2011 16:01:01 +0000 (17:01 +0100)]
Lighthouse: Fix a block for wayland with gl support

The initialial readable iteration, needs to be done before
initializing egl, or it will be done inside egl.
The readable iteration after initialzing egl would block
forever otherwise.

13 years agoBuild fixes for the Wayland plugin
Paul Olav Tvete [Wed, 2 Mar 2011 08:50:10 +0000 (09:50 +0100)]
Build fixes for the Wayland plugin

Add qmake.conf variables, and use the generic font plugin.

Reviewed-by: Jørgen
13 years agoadded capabilites to QPlatformIntegration
Gunnar Sletta [Mon, 21 Feb 2011 11:57:34 +0000 (12:57 +0100)]
added capabilites to QPlatformIntegration

Reviewed-by: Jørgen Lind
13 years agoAvoid flicker
Paul Olav Tvete [Fri, 25 Feb 2011 11:56:28 +0000 (12:56 +0100)]
Avoid flicker

Don't start a new paint until we get an ack from the compositor

Reviewed-by: Samuel
13 years agoMake it build when EGL is not available
Paul Olav Tvete [Thu, 24 Feb 2011 16:31:15 +0000 (17:31 +0100)]
Make it build when EGL is not available

Reviewed-by: Jørgen
13 years agoLighthouse:Propogate the configure event to the QWaylandWindow
Jørgen Lind [Fri, 11 Feb 2011 14:12:59 +0000 (15:12 +0100)]
Lighthouse:Propogate the configure event to the QWaylandWindow

13 years agoLighthouse: Wayland: Sort out egl includes in plugin
Jørgen Lind [Fri, 11 Feb 2011 06:55:12 +0000 (07:55 +0100)]
Lighthouse: Wayland: Sort out egl includes in plugin

We used to include the X part of the eglplatform.h, but now the mesa
version of the header file has a WL_EGL_PLATFORM part. This define is
defined in wayland-egl.h which thus needs to be included before any egl
header file.

13 years agoLighthouse: Wayland compile-fix for egl interface change
Jørgen Lind [Thu, 10 Feb 2011 09:09:18 +0000 (10:09 +0100)]
Lighthouse: Wayland compile-fix for egl interface change

13 years agoLighthouse: Wayland: Fix include
Jørgen Lind [Thu, 10 Feb 2011 09:08:56 +0000 (10:08 +0100)]
Lighthouse: Wayland: Fix include

13 years agoLighthouse: Wayland: Use EGLSurface
Jørgen Lind [Wed, 9 Feb 2011 14:16:14 +0000 (15:16 +0100)]
Lighthouse: Wayland: Use EGLSurface

13 years agoLighthouse Wayland: wayland-egl entry points where renamed
Jørgen Lind [Mon, 7 Feb 2011 17:14:32 +0000 (18:14 +0100)]
Lighthouse Wayland: wayland-egl entry points where renamed

Conflicts:

src/plugins/platforms/wayland/qwaylanddisplay.cpp
src/plugins/platforms/wayland/qwaylanddrmsurface.cpp

13 years agowayland: Use wayland-egl instead of drm specific code
Kristian Høgsberg [Sat, 5 Feb 2011 14:20:19 +0000 (09:20 -0500)]
wayland: Use wayland-egl instead of drm specific code

13 years agoLighthouse: Wayland, if we don't have cursors installed
Jørgen Lind [Fri, 28 Jan 2011 07:38:10 +0000 (08:38 +0100)]
Lighthouse: Wayland, if we don't have cursors installed

or the configuration is faulty, then don't change cursors

13 years agowayland: Handle keyboard focus correctly
Kristian Høgsberg [Thu, 27 Jan 2011 18:52:40 +0000 (13:52 -0500)]
wayland: Handle keyboard focus correctly

Activate the window widget and update modifiers.

13 years agoLighthouse: Wayland plugin. Only create depth and stencil buffers once
Kristian Høgsberg [Thu, 27 Jan 2011 14:25:00 +0000 (15:25 +0100)]
Lighthouse: Wayland plugin. Only create depth and stencil buffers once

13 years agoRemove unneeded include
Jørgen Lind [Thu, 27 Jan 2011 11:36:51 +0000 (12:36 +0100)]
Remove unneeded include

13 years agoLighthouse: Wayland. Make the wayland integration closer to Lighthosue
Jørgen Lind [Tue, 25 Jan 2011 16:01:21 +0000 (17:01 +0100)]
Lighthouse: Wayland. Make the wayland integration closer to Lighthosue

Today there is a connection between QWidget and QPlatformScreen. So I
added a accessor in QWaylandScreen to get the corresponding
QWaylandDisplay. So now it should be possible to have different
QWaylandDisplays. But also its possible to use the internal Lighthouse
api closer in the wayland plugin if that should be of interest ;)

13 years agoLighthouse: Wayland, only make one fbo for the WaylandPaintDevice
Jørgen Lind [Tue, 25 Jan 2011 13:48:25 +0000 (14:48 +0100)]
Lighthouse: Wayland, only make one fbo for the WaylandPaintDevice

Actually the fbo belongs to the QWaylandPaintDevice, which also holds n
QWaylandDrmBuffers. Then the QWaylandDrmWindowSurface gets the current
drmbuffer used on flush and attaches it to the window and calls
wl_surface_damage

13 years agoMaking clearer separation between responsibility of different classes
Jørgen Lind [Fri, 21 Jan 2011 14:52:02 +0000 (15:52 +0100)]
Making clearer separation between responsibility of different classes

Ie. Moving code into different files and refactoring some of the
classes. The Drmbuffer was most affected.

It has a depth and stencil buffer.
QWaylandGLContext contain the context. The drm buffer class has to
be bound to the context before used.

13 years agoLighthouse:Wayland Moving some logic into files
Jørgen Lind [Mon, 10 Jan 2011 14:48:20 +0000 (15:48 +0100)]
Lighthouse:Wayland Moving some logic into files

13 years agoFix Wayland plugin to work with Wayland after some interfaces changed
Jørgen Lind [Wed, 5 Jan 2011 11:10:28 +0000 (12:10 +0100)]
Fix Wayland plugin to work with Wayland after some interfaces changed

such as
wl_display_create -> wl_display_connect
wl_surface_attach (attributes)
wl_surface_map -> wl_surface_map_toplevel
wl_shell_listener
wl_output_listener

13 years agoFix for uninitialized member in QWaylandCursor
Rolf Offermanns [Thu, 25 Nov 2010 11:13:30 +0000 (12:13 +0100)]
Fix for uninitialized member in QWaylandCursor

Without this patch Qt applications will crash the moment the mouse pointer
enters the window.

Signed-off-by: Rolf Offermanns <roffermanns@sysgo.com>
13 years agowayland: use pkgconfig for libdrm in wayland.pro
Benjamin Franzke [Sun, 21 Nov 2010 13:18:51 +0000 (14:18 +0100)]
wayland: use pkgconfig for libdrm in wayland.pro

On this system the IncludePath for drm.h was missing

So maybe pkgconfig should be additionally also used for
libxkbcommon, EGL and GLESv2 to prevent such problems.
but i dont know whether its common to use pkg-config in qmake

13 years agoWayland: request rbg and premultiplied argb visuals as needed
Jesse Barnes [Tue, 9 Nov 2010 20:44:18 +0000 (12:44 -0800)]
Wayland: request rbg and premultiplied argb visuals as needed

When creating DRM buffers we should try to match the visual type
requested with the buffer format.

13 years agoWayland: clamp window resizes to screen size
Jesse Barnes [Mon, 8 Nov 2010 21:05:19 +0000 (13:05 -0800)]
Wayland: clamp window resizes to screen size

13 years agoWayland: split GL code into separate files
Jesse Barnes [Mon, 8 Nov 2010 20:24:09 +0000 (12:24 -0800)]
Wayland: split GL code into separate files

For clarity and to prevent merge conflicts etc. in future.

13 years agoWayland: use correct viewport for swapBuffers and correct coords
Jesse Barnes [Thu, 28 Oct 2010 23:18:15 +0000 (16:18 -0700)]
Wayland: use correct viewport for swapBuffers and correct coords

We're drawing into the parent, so we need to use the parent's geometry
for the GL viewport, or we may not be able to draw it.  We also need to
use the parent width & height when checking whether to normalize to 1.0
or -1.0 in the coord transform calculations.

13 years agoWayland: fix geometry of swapBuffers
Jesse Barnes [Thu, 28 Oct 2010 18:15:04 +0000 (11:15 -0700)]
Wayland: fix geometry of swapBuffers

If the geometry isn't mapped 1:1 we need to divide the bottom by height,
not width, to calculate the texture rectangle.

13 years agoWayland: clean up swapBuffers code
Jesse Barnes [Thu, 28 Oct 2010 18:13:13 +0000 (11:13 -0700)]
Wayland: clean up swapBuffers code

Pull the swap fbo and rbo into the context and make sure to destroy them
when the context goes away.  Add unfortunate lazy allocation of the fbo
and rbo because we need them to be part of the right context.

13 years agoWayland: add GL widget support
Jesse Barnes [Wed, 27 Oct 2010 22:01:38 +0000 (15:01 -0700)]
Wayland: add GL widget support

Make sure we copy from the private surface into the parent surface at
swapBuffers time.

13 years agoWayland: set parent window pointer in setParent()
Jesse Barnes [Wed, 27 Oct 2010 21:49:16 +0000 (14:49 -0700)]
Wayland: set parent window pointer in setParent()

We'll need this to handle GL widgets.

13 years agoWayland: render to a texture, not a renderbuffer
Jesse Barnes [Wed, 27 Oct 2010 21:44:04 +0000 (14:44 -0700)]
Wayland: render to a texture, not a renderbuffer

This will let us source from offscreen GL widget surfaces and copy into
the parent surface.

13 years agoWayland: put context & drawing objects into the drm surface
Jesse Barnes [Wed, 27 Oct 2010 21:38:03 +0000 (14:38 -0700)]
Wayland: put context & drawing objects into the drm surface

Even GL widgets will allocate window surfaces, so share everything
there.  This still leaves a hole when we mix GL widgets and the raster
back end (the created platform GL context won't have a DRM buffer to use
for its objects & context), but that won't work right now anyway...

13 years agoWayland: add partial GL widget support
Jesse Barnes [Mon, 25 Oct 2010 18:38:29 +0000 (11:38 -0700)]
Wayland: add partial GL widget support

GL widgets need a platform GL context.  Add one to get hellogl_es2
limping along.

13 years agoWayland: add waylandgl platform type
Jesse Barnes [Mon, 25 Oct 2010 18:36:45 +0000 (11:36 -0700)]
Wayland: add waylandgl platform type

This will set mUseOpenGL when -platform waylandgl is passed to clients.

13 years agoWayland: silence unused variable warnings in qwaylandinputdevice.cpp
Jesse Barnes [Fri, 22 Oct 2010 21:00:08 +0000 (14:00 -0700)]
Wayland: silence unused variable warnings in qwaylandinputdevice.cpp

13 years agoWayland: add GL drawing support
Jesse Barnes [Fri, 22 Oct 2010 17:31:03 +0000 (10:31 -0700)]
Wayland: add GL drawing support

Works with analogclock, draws upside down, fails to resize, and doesn't
show GL widget with hello_es2.

13 years agoWayland: misc cleanups
Jesse Barnes [Fri, 22 Oct 2010 17:30:27 +0000 (10:30 -0700)]
Wayland: misc cleanups

Unused variables, debug output.

13 years agoIntroduce drm wayland buffer
Kristian Høgsberg [Fri, 15 Oct 2010 01:25:15 +0000 (21:25 -0400)]
Introduce drm wayland buffer

13 years agoInitialize EGL
Kristian Høgsberg [Thu, 14 Oct 2010 19:36:59 +0000 (15:36 -0400)]
Initialize EGL

13 years agoCursors, keyboard support, move/resize
Kristian Høgsberg [Fri, 8 Oct 2010 20:02:01 +0000 (16:02 -0400)]
Cursors, keyboard support, move/resize

13 years agoUse QImage::Format_ARGB32_Premultiplied for the surface
Kristian Høgsberg [Thu, 7 Oct 2010 21:07:59 +0000 (17:07 -0400)]
Use QImage::Format_ARGB32_Premultiplied for the surface

13 years agowayland: Track the QWaylandWindow in the input device instead of the surface
Kristian Høgsberg [Thu, 7 Oct 2010 16:23:14 +0000 (12:23 -0400)]
wayland: Track the QWaylandWindow in the input device instead of the surface

The surface is destroyed when the window is hidden, so we can't use that
for looking up the widget to send events to.

13 years agowayland: Assign a window id to wayland windows
Kristian Høgsberg [Thu, 7 Oct 2010 15:47:08 +0000 (11:47 -0400)]
wayland: Assign a window id to wayland windows

13 years agowayland: Create and destroy surface at show and hide
Kristian Høgsberg [Thu, 7 Oct 2010 15:46:13 +0000 (11:46 -0400)]
wayland: Create and destroy surface at show and hide

13 years agowayland: Split input device out to its own file
Kristian Høgsberg [Thu, 7 Oct 2010 14:54:39 +0000 (10:54 -0400)]
wayland: Split input device out to its own file

13 years agoAdd wayland lighthouse plugin start
Kristian Høgsberg [Thu, 7 Oct 2010 01:51:23 +0000 (21:51 -0400)]
Add wayland lighthouse plugin