1. 18 Feb, 2014 4 commits
  2. 10 Feb, 2014 1 commit
  3. 08 Feb, 2014 2 commits
    • Kristian Høgsberg's avatar
      client: Queue display events on private queue and always dispatch · b9eebce0
      Kristian Høgsberg authored
      The wl_display events (error and delete_id) need to be handled even
      if the default queue doesn't get dispatched for a while.  For example,
      a busy EGL rendering loop hits wl_display.sync every eglSwapBuffers()
      and we need to process the delete_id events to maintain the object ID
      data structure.
      As it is, that doesn't happen, but with this change we special case
      wl_display events.  We put them on a custom, private queue and when
      dispatching events, we always dispatch display_queue events first.
      The wl_display proxy should still be the default_queue, so that objects
      created from wl_display requests get assigned to that.
    • Kristian Høgsberg's avatar
      client: Rename display->queue to default_queue · a9eb563f
      Kristian Høgsberg authored
      We'll add a new queue next, so rename the default queue first.
  4. 07 Feb, 2014 1 commit
  5. 06 Feb, 2014 2 commits
    • Jason Ekstrand's avatar
    • Neil Roberts's avatar
      Don't deref the sample pointer in the wl_container_of macro · a18e3441
      Neil Roberts authored
      The previous implementation of the wl_container_of macro was
      dereferencing the sample pointer in order to get an address of the
      member to calculate the offset. Ideally this shouldn't cause any
      problems because the dereference doesn't actually cause the address to
      be read from so it shouldn't matter if the pointer is uninitialised.
      However this is probably technically invalid and could cause undefined
      behavior. Clang appears to take advantage of this undefined behavior
      and doesn't bother doing the subtraction. It also gives a warning when
      it does this.
      The documentation for wl_container_of implies that it should only be
      given an initialised pointer and if that is done then there is no
      problem with clang. However this is quite easy to forget and doesn't
      cause any problems or warnings with gcc so it's quite easy to
      accidentally break clang.
      To fix the problem this changes the macro to use pointer -
      offsetof(__typeof__(sample), member) so that it doesn't need to deref
      the sample pointer. This does however require that the __typeof__
      operator is supported by the compiler. In practice we probably only
      care about gcc and clang and both of these happily support the
      The previous implementation was also using __typeof__ but it had a
      fallback path avoiding it when the operator isn't available. The
      fallback effectively has undefined behaviour and it is targetting
      unknown compilers so it is probably not a good idea to leave it in.
      Instead, this patch just removes it. If someone finds a compiler that
      doesn't have __typeof__ but does work with the old implementation then
      maybe they could add it back in as a special case.
      This patch removes the initialisation anywhere where the sample
      pointer was being unitialised before using wl_container_of. The
      documentation for the macro has also been updated to specify that this
      is OK.
  6. 31 Jan, 2014 3 commits
  7. 24 Jan, 2014 1 commit
  8. 20 Jan, 2014 4 commits
  9. 19 Jan, 2014 1 commit
  10. 17 Jan, 2014 1 commit
  11. 15 Jan, 2014 11 commits
  12. 10 Jan, 2014 1 commit
  13. 09 Jan, 2014 1 commit
  14. 17 Dec, 2013 2 commits
  15. 10 Dec, 2013 1 commit
  16. 09 Dec, 2013 2 commits
  17. 05 Dec, 2013 1 commit
    • Neil Roberts's avatar
      client: Make wl_proxy_set_queue() with NULL revert to default queue · 1521c62a
      Neil Roberts authored
      This will be useful in order to implement the
      EGL_WL_create_wayland_buffer_from_image extension. The buffers created
      within Mesa's Wayland platform are created using the the wl_drm object
      as a proxy factory which means they will be set to use Mesa's internal
      event queue. However, these buffers will be owned by the client
      application so they ideally need to use the default event loop. This
      function provides a way to set the proxy's event queue back to the
      krh: Edited from Neils original patch to just use wl_proxy_set_queue() with
      a NULL argument instead of introducing a new function.
  18. 03 Dec, 2013 1 commit
    • Pekka Paalanen's avatar
      cursor: handle running out of buffer space · 3b3e81f4
      Pekka Paalanen authored
      If posix_fallocate is available, use it to detect when we are running
      out of buffer space.
      Propagate the failure properly through the various functions, stopping
      loading cursors but keeping the cursors that were already successfully
      This may result in an animated cursor not having all of its images, or a
      cursor theme not having all of its cursors. When that happens, the
      failure is NOT communicated to the application. Instead, the application
      will get NULL from wl_cursor_theme_get_cursor() for a cursor that was
      not loaded successfully. If an animated cursor is missing only some
      images, the animation is truncated but the cursor is still available.
      This patch relies on the commit "os: use posix_fallocate in creating
      sharable buffers" for defining HAVE_POSIX_FALLOCATE.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>