Commit graph

1376 commits

Author SHA1 Message Date
Scott Anderson
67b51f0922 Upgraded CRTC and Encoder matching 2017-08-06 15:49:05 +12:00
Scott Anderson
31867a1b2e Various changes/cleanups 2017-08-06 15:49:05 +12:00
Scott Anderson
7b772e1a4b DRM resource initalisation 2017-08-06 15:49:02 +12:00
Scott Anderson
601bbad5d8 Added DRM property infrastructure 2017-08-06 15:47:00 +12:00
Drew DeVault
f95c02eebe Merge pull request #29 from ascent12/session
Moved session into backend/session and changed ownership
2017-08-05 23:11:26 -04:00
Drew DeVault
5bf61ca7ed Check for multi backend before using it 2017-08-05 23:08:35 -04:00
Drew DeVault
f1a069d50d Log that the X11 backend is unimplemented 2017-08-05 23:03:56 -04:00
Scott Anderson
4d4da18437 Fixed VT switching 2017-08-06 13:37:49 +12:00
Scott Anderson
3373ec5fc8 Update build files 2017-08-06 13:30:18 +12:00
Scott Anderson
cb4d50e22c Changed header paths. 2017-08-06 13:25:26 +12:00
Scott Anderson
2ae5cd6539 Moved session/ into backend/ 2017-08-06 13:25:26 +12:00
Scott Anderson
ae4478e17f Changed ownership of wlr_session to the multi backend.
Currently breaks VT switching for examples.
2017-08-06 13:25:26 +12:00
Drew DeVault
41b98f21e5 Merge pull request #42 from acrisci/bug/no-switch-active-textures
Remove unnecessary calls to glActiveTexture
2017-08-05 18:26:43 -04:00
Drew DeVault
d6d1d57c69 Merge pull request #31 from nyorain/merged
Use meson as build system
2017-08-05 18:26:13 -04:00
nyorain
fdab81e1c9 Use meson build system 2017-08-05 22:34:24 +02:00
Tony Crisci
9119be1dd1 Remove unnecessary calls to glActiveTexture
Since wlroots shaders only use one texture at a time (ie there is only one
sampler2D variable in any shader), it is unnecessary to switch between active
texture units at this time.
2017-08-05 10:41:05 -04:00
Drew DeVault
ce886c0353 Add .build.yml for builds.sr.ht 2017-08-04 16:51:44 -04:00
Drew DeVault
7c393d5143 Missed a variable 2017-08-04 16:44:45 -04:00
Drew DeVault
95653c0bf7 Minor nitpicking in wl_compositor 2017-08-04 16:26:21 -04:00
Drew DeVault
de17ce19be Merge pull request #41 from acrisci/feature/surface-interface-stub
Add surface interface stubs in compositor example
2017-08-04 16:21:43 -04:00
Tony Crisci
effea557bb Implement destroying surfaces
Add a signal for wlr_surface destruction on the wlr_surface that compositors
can listen to to remove the surface from their state.

Implement a listener for this in the example wl_compositor to remove the
surface from its internal list of surfaces.

Destroy the surface in the compositor destroy_surface callback given when the
surface resource was created.

Add a reference to the surface resource to the wlr_surface so a compositor can
find it in its list of resources upon wlr_resource destruction.
2017-08-04 11:53:55 -04:00
Tony Crisci
6610aa7ca7 Implement shm buffer surface attach interface
Implement surface_attach method. This is called when a client attaches an shm
buffer with wl_surface_attach().

Implement the GLES2 interface for attaching shm buffers. This creates an opengl
texture with the shm buffer contents for the surface.

This commit also includes some working code to render the surfaces onto the
screen for demonstration purposes.
2017-08-04 11:41:13 -04:00
Tony Crisci
555914a13b Add surface interface stubs in compositor example
Add the wayland surface interface to the example compositor.

Implement the create_surface method to create a new wlr surface from the
wayland surface and add the interface.
2017-08-03 10:46:08 -04:00
Drew DeVault
359042081f Fix #40 2017-08-02 22:57:50 -04:00
Drew DeVault
2bfacc63d3 Merge pull request #39 from acrisci/bug/fix-wl-enum-touch
Use correct pixel format enum in touch example
2017-07-31 15:55:57 -04:00
Tony Crisci
aebe5ba48c Use correct pixel format enum in touch example
Fix a call to `wlr_surface_attach_pixels()` in the main method of the touch
example to use the correct enum for this method (wayland instead of gl).
2017-07-31 14:54:00 -04:00
Drew DeVault
f08998627f Merge pull request #36 from acrisci/bug/supported-cursor-pixel-format
Use ARGB8888 pixel format for cursor bo
2017-07-30 16:06:06 -04:00
Scott Anderson
5743ea03b8 Merge pull request #37 from acrisci/bug/session-path
Correctly get session path
2017-07-30 00:44:50 +12:00
Tony Crisci
5eeb067838 Correctly get session path
The old way of getting the session path was to simply append the session id to
the path "/org/freedesktop/login1/session/". However this is not the correct
path for newer systems like Fedora 26.

Instead, get the session path directly from the session manager from the id via
a dbus call to GetSession().

fixes #35
2017-07-29 08:16:14 -04:00
Tony Crisci
d822e0768b Use ARGB8888 pixel format for cursor bo
The previous pixel format (RGBA8888) is not supported on all devices for cursors.

Weston uses ARGB8888 exclusively for its cursor buffer object which leads me to
believe this pixel format is better supported.
2017-07-27 17:55:35 -04:00
Drew DeVault
b1ec0dce3a Merge pull request #34 from acrisci/bug/fix-cleanup-pageflip-race
bugfix: add null check on output gbm on pageflip
2017-07-24 20:36:33 -04:00
Drew DeVault
3dd6a06df0 Merge pull request #33 from acrisci/bug/fix-software-cursor
bugfix: fix cursor software rendering fallback
2017-07-24 20:36:22 -04:00
Tony Crisci
8b6dc48355 bugfix: add null check on output gbm on pageflip
The gbm for the output might be null for the pageflip in the case that
the output has been disconnected. The gbm might be set to null by
wlr_drm_output_cleanup() in this case.

If the output is cleaned up before the pageflip, then a double free
will crash the compositor on the call to gbm_surface_release_buffer()
in the pageflip handler. The outputs buffer object bo[1] will point to
invalid memory.
2017-07-24 19:50:13 -04:00
Tony Crisci
a43016b8e2 bugfix: fix cursor software rendering fallback
wlr_surface_attach_pixels() expects a wl_shm_format but a GL format was
given. This caused a bug where software rendering of the cursor would
fail when no pixel format can be found.
2017-07-24 16:34:40 -04:00
Drew DeVault
13f3c69ec6 Fix LTO (fixes #26) 2017-07-18 09:48:18 -04:00
Drew DeVault
23d2301496 Oh my god Clang seriously just fuck off 2017-07-12 10:16:33 -04:00
Drew DeVault
ec0f4c2d99 Fuck off, clang 2017-07-12 09:54:58 -04:00
Drew DeVault
e92a65fee8 Remove use of missing header 2017-07-12 09:49:26 -04:00
Drew DeVault
699b364787 Merge pull request #30 from mikkeloscar/add-travis
Build on travis-ci.
2017-07-12 09:24:42 -04:00
Drew DeVault
73a908665d Fix unused variables in release builds 2017-07-12 09:24:11 -04:00
Mikkel Oscar Lyderik Larsen
413bfc7fb8
Build on travis-ci. 2017-07-12 14:31:43 +02:00
Drew DeVault
b08aa9fd35 Revert "Merge pull request #27 from ascent12/meson"
This reverts commit 85805da021, reversing
changes made to 8189c64d7f.
2017-07-11 22:16:56 -04:00
Drew DeVault
7b9c330bc5 Revert "Fixed linking error"
This reverts commit c81324bd0b.
2017-07-11 22:16:52 -04:00
Scott Anderson
c81324bd0b Fixed linking error 2017-07-12 13:46:47 +12:00
Drew DeVault
85805da021 Merge pull request #27 from ascent12/meson
[Proposal] Use the Meson build system
2017-07-11 20:15:28 -04:00
Scott Anderson
e54b1eded4 Small linking fix 2017-07-11 12:24:43 +12:00
Scott Anderson
a2ba226ba3 Use subdir 2017-07-11 09:56:54 +12:00
Scott Anderson
924bf0f669 Changed build system to meson 2017-07-11 00:28:56 +12:00
Scott Anderson
8189c64d7f Fixed that warnings that showed up with optimisations. 2017-07-11 00:14:55 +12:00
Drew DeVault
be064df25e Merge pull request #25 from ascent12/forking
Forking session backend
2017-07-09 22:28:19 -04:00