1. 26 Jul, 2016 1 commit
  2. 27 Jun, 2016 1 commit
  3. 23 Jun, 2016 2 commits
  4. 06 Jun, 2016 1 commit
  5. 18 Apr, 2016 1 commit
    • Benoit Gschwind's avatar
      headless: port the headless backend to the new init api · 3c53094e
      Benoit Gschwind authored
      refactor configuration API of headless-backend
      Signed-off-by: default avatarBryce Harrington <bryce@osg.samsung.com>
      Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      
      v6:
        - Define version number in the header
        - Don't use leading underscores in header guards
        - Add stub config_init_to_defaults()
        - Allocate config on stack
        - Drop unused display_name parameter
        - Add error message when config is invalid
        - Install compositor-headless.h and list it in headless-backend sources
      v5:
        - Update to current trunk
        - Fixed typo 'struct weston_wayland_backend_config'
        - Dropped unused variables
        - Dropped weston_headless_backend_config_create() in favor of
          directly zalloc'ing the object
        - Dropped weston_headless_backend_load() in favor of the more
          generalized load_backend_new().
        - Dropped typedef from header
        - Restored use of 'backend_init' entry point
        - Backend_init() takes a base weston_backend_config object
        - Renamed 'param' to 'config' in a few places for consistency
        - Renamed 'headless_options' variable to 'options for consistency
        - Version the base struct
        - Free config on error
        - Don't free config during backend_init normal operations
        - Adjust header ordering
        - Make header guard naming consistent with other headers
        - Light reformatting for code style and consistency with other
          backend config patches
      Signed-off-by: default avatarBryce Harrington <bryce@osg.samsung.com>
      Reviewed-by: default avatarGiulio Camuffo <giuliocamuffo@gmail.com>
      [Pekka: rebased to apply before drm and x11 backends]
      [Pekka: squashed in the headless part of "Enforce destruction of all
      backend config objects after initialization"]
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      3c53094e
  6. 07 Mar, 2016 1 commit
  7. 23 Oct, 2015 1 commit
  8. 10 Jul, 2015 1 commit
    • Giulio Camuffo's avatar
      compositor: add API to manage compositor instances · 459137bf
      Giulio Camuffo authored
      This commit adds three new exported functions:
      - weston_compositor_create() returns a new weston_compositor instance,
      initializing it as the now removed weston_compositor_init() did.
      - weston_compositor_exit(compositor) asks the compositor to tear
      down by calling the compositor's exit vfunc which is set by the
      libweston application.
      - weston_compositor_destroy(compositor) is called by the libweston
      application when tearing down the compositor. The compositor is destroyed
      and the memory freed.
      Reviewed-by: default avatarJon A. Cruz <jonc@osg.samsung.com>
      Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      459137bf
  9. 09 Jul, 2015 1 commit
    • Giulio Camuffo's avatar
      compositor: introduce struct weston_backend · 954f183e
      Giulio Camuffo authored
      This is a preliminary change for libweston, with no functional modifications.
      Separate the backends and the core weston_compositor struct, by creating
      the weston_compositor in the main(), and having the various backends extend
      the weston_backend struct, an instance of which is returned by the backend
      entry point.
      This enable us to logically separate the compositor core from the backend,
      allowing the core to be extended without messing with the backends.
      Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      954f183e
  10. 16 Jun, 2015 1 commit
  11. 15 Jun, 2015 1 commit
  12. 08 May, 2015 1 commit
    • Giulio Camuffo's avatar
      compositor: send the output_created signal after inserting it in the list · b114715d
      Giulio Camuffo authored
      The compositor's output_created signal used to be sent in weston_output_init()
      which the backend call before putting the output in the output_list.
      This caused problems when creating a new view in a listener to that signal,
      because weston_view_assign_output() doesn't yet know the new output exists.
      To fix this add a new weston_composito_add_output() func which adds the
      output in the list and later sends the signal, and make the backends call
      that.
      b114715d
  13. 20 Mar, 2015 1 commit
    • Pekka Paalanen's avatar
      compositor, backends: weston_compositor_read_presentation_clock · 662f384e
      Pekka Paalanen authored
      Create a new function weston_compositor_read_presentation_clock() to
      wrap the clock_gettime() call for the Presentation clock.
      
      Reading the presentation clock is never supposed to fail, but if it
      does, this will notify about it. I have not seen it fail yet, though.
      
      This prepares for new testing features in the future that might allow
      controlling the presentation clock. Right now it is just a convenience
      function for clock_gettime().
      
      All presentation clock readers are converted to call this new function
      except rpi-backend's rpi_flippipe_update_complete(), because it gets its
      clock id via a thread-safe mechanism. There shouldn't be anything really
      thread-unsafe in weston_compositor_read_presentation_clock() at the
      moment, but might be in the future, and weston core is not expected to
      need to be thread-safe.
      
      This is based on the original patch by
      Cc: Derek Foreman <derekf@osg.samsung.com>
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-By: default avatarDerek Foreman <derekf@osg.samsung.com>
      Reviewed-by: default avatarBryce Harrington <bryce@osg.samsung.com>
      662f384e
  14. 19 Feb, 2015 1 commit
  15. 21 Jan, 2015 1 commit
    • Pekka Paalanen's avatar
      compositor: set presentation.presented flags · 363aa7bc
      Pekka Paalanen authored
      Change weston_output_finish_frame() signature so that backends are
      required to set the flags, that will be reported on the Presentation
      'presented' event. This is meant for output-wide feedback flags. Flags
      that vary per wl_surface are subject for the following patch.
      
      All start_repaint_loop functions use the special private flag
      PRESENTATION_FEEDBACK_INVALID to mark, that this call of
      weston_output_finish_frame() cannot trigger the 'presented' event. If it
      does, we now hit an assert, and should then investigate why a fake update
      triggered Presentation feedback.
      
      DRM:
      
      Page flip is always vsync'd, and always gets the completion timestamp
      from the kernel which should correspond well to hardware. Completion is
      triggered by the kernel/hardware.
      
      Vblank handler is only used with the broken planes path, therefore do
      not report VSYNC, because we cannot guarantee all the planes updated at
      the same time. We cannot set the INVALID, because it would abort the
      compositor if the broken planes path was ever used.  This is a hack that
      will get fixed with nuclear pageflip support in the future.
      
      fbdev:
      
      No vsync, update done by copy, no completion event from hardware, and
      completion time is totally fake.
      
      headless:
      
      No real output to update.
      
      RDP:
      
      Guessing that maybe no vsync, fake time, and copy make sense (pixels
      sent over network). Also no event that the pixels have been shown?
      
      RPI:
      
      Presumably Dispmanx updates are vsync'd. We get a completion event from
      the driver, but need to read the clock ourselves, so the completion time
      is somewhat unreliable. Zero-copy flag not implemented though it would
      be theoretically possible with EGL clients (zero-copy is a per-surface
      flag anyway, so in this patch).
      
      Wayland:
      
      No information how the host compositor is doing updates, so make a safe
      guess without assuming vsync or hardware completion event. While we do
      get some timestamp from the host compositor, it is not the completion
      time. Would need to hook to the Presentation extension of the host
      compositor to get more accurate flags.
      
      X11:
      
      No idea about vsync, completion event, or copying. Also the timestamp is
      a fake.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Mario Kleiner's avatarMario Kleiner <mario.kleiner.de@gmail.com>
      Tested-by: Mario Kleiner's avatarMario Kleiner <mario.kleiner.de@gmail.com>
      Acked-by: Mario Kleiner's avatarMario Kleiner <mario.kleiner.de@gmail.com>
      363aa7bc
  16. 21 Nov, 2014 2 commits
  17. 30 Sep, 2014 1 commit
    • Pekka Paalanen's avatar
      compositor: set and use the presentation clock everywhere · b5eedade
      Pekka Paalanen authored
      Add presentation clock setters that verify the given clock actually
      works. Offer an automatic choice of a software fallback clock, when a
      backend has to always use clock_gettime() to approximate the
      presentation time.
      
      The DRM backend already queried the DRM about the clock id, just let the
      DRM backend set the presentation clock from that.
      
      For all other backends which do not get a timestamp from the driver,
      call the software clock setter to choose a suitable clock.
      
      Report the chosen clock via presentation.clock_id event to clients.
      
      In finish_frame(), upgrade the argument from uint32_t milliseconds to
      struct timespec which can accurately hold the presentation clock values.
      This will be needed when weston_output_finish_frame() starts to send out
      presentation_feedback.presented events.
      
      While at it, replace gettimeofday() calls with clock_gettime() using the
      chosen presentation clock, so we manufacture presentation timestamps
      from the presentation clock when the gfx drivers cannot give us a proper
      timestamp.
      
      Rpi patch is more verbose due to not having the compositor pointer
      available in rpi_flippipe_update_complete(). Explicitly carry the clock
      id with flippipe so it is available in the thread.
      
      Changes in v4:
      
      * rpi debug build fix
      
      v4 Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
      v3 Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
      b5eedade
  18. 18 Feb, 2014 1 commit
  19. 22 Dec, 2013 1 commit
    • Ander Conselvan de Oliveira's avatar
      compositor: Destroy renderer in weston_compositor_shutdown() · 18536764
      Ander Conselvan de Oliveira authored
      Currently we destroy the renderer before the outputs are destroyed, but
      that sometimes leads to an error since a reference to the renderer is
      necessary in order to destroy a gl_renderer_output.
      
      Since destroying the renderer is common among all backends, just move
      that call into weston_compositor_shutdown() immediately after the
      outputs being destroyed.
      18536764
  20. 17 Dec, 2013 1 commit
  21. 22 Oct, 2013 1 commit
    • David Rheinsberg's avatar
      compositor: finish frame if redraw fails · 1edf44ce
      David Rheinsberg authored
      If we are about to finish a frame, but a redraw is pending and we let the
      compositor redraw, we need to check for errors. If the redraw fails and
      the backend cannot schedule a page-flip, we need to finish the frame,
      anyway.
      
      All backends except DRM use a timer to schedule frames. Hence, they cannot
      fail. But for DRM, we need to be able to handle drmModePageFlip() failures
      in case access got revoked.
      
      This fixes a bug where logind+drm caused keyboard input to be missed as we
      didn't reenable it after a failed page-flip during deactivation.
      1edf44ce
  22. 21 Sep, 2013 2 commits
    • David Fort's avatar
      Notify clients on mode_switch() · 57388e44
      David Fort authored
      This patch implements the notification of clients during mode_switch.
      As discussed on IRC, clients are notified of mode_switch only when the
      "native" mode is changed and activated. That means that if the native
      mode is changed and the compositor had activated a temporary mode for
      a fullscreen surface, the clients will be notified only when the native
      mode is restored.
      The scaling factor is treated the same way as modes.
      57388e44
    • David Fort's avatar
      Rename current, origin, scale, origin_scale · ff39efa5
      David Fort authored
      This patch renames that fields to have consistent names.
      ff39efa5
  23. 08 Aug, 2013 1 commit
  24. 05 Jun, 2013 2 commits
    • Daniel Stone's avatar
      configure.ac: Enable AC_USE_SYSTEM_EXTENSIONS · c228e23b
      Daniel Stone authored
      AC_USE_SYSTEM_EXTENSIONS enables _XOPEN_SOURCE, _GNU_SOURCE and similar
      macros to expose the largest extent of functionality supported by the
      underlying system.  This is required since these macros are often
      limiting rather than merely additive, e.g. _XOPEN_SOURCE will actually
      on some systems hide declarations which are not part of the X/Open spec.
      
      Since this goes into config.h rather than the command line, ensure all
      source is consistently including config.h before anything else,
      including system libraries.  This doesn't need to be guarded by a
      HAVE_CONFIG_H ifdef, which was only ever a hangover from the X.Org
      modular transition.
      Signed-off-by: Daniel Stone's avatarDaniel Stone <daniel@fooishbar.org>
      
      [pq: rebased and converted more files]
      c228e23b
    • Rob Bradford's avatar
      9af5f9e0
  25. 27 May, 2013 1 commit
  26. 22 May, 2013 1 commit
    • Alexander Larsson's avatar
      compositor: Support output/buffer scaling · 4ea9552d
      Alexander Larsson authored
      If you specify e.g. scale=2 in weston.ini an output section for the
      X11 backend we automatically upscale all normal surfaces by this
      amount. Additionally we respect a buffer_scale set on the buffer to
      mean that the buffer is already in a scaled form.
      
      This works with both the gl and the pixman renderer. The non-X
      backends compile and work, but don't support changing the output
      scale (they do downscale as needed due to buffer_scale though).
      
      This also sends the new "scale" and "done" events on wl_output,
      making clients aware of the scale.
      4ea9552d
  27. 14 May, 2013 1 commit
    • Ossama Othman's avatar
      config-parser: Honor XDG_CONFIG_DIRS · a50e6e4c
      Ossama Othman authored
      This set of changes adds support for searching for a given config file
      in the directories listed in $XDG_CONFIG_DIRS if it wasn't found in
      $XDG_CONFIG_HOME or ~/.config.  This allows packages to install custom
      config files in /etc/xdg/weston, for example, thus allowing them to
      avoid dealing with home directories.
      
      To avoid a TOCTOU race the config file is actually open()ed during the
      search.  Its file descriptor is returned and stored in the compositor
      for later use when performing subsequent config file parses.
      Signed-off-by: default avatarOssama Othman <ossama.othman@intel.com>
      a50e6e4c
  28. 08 Apr, 2013 1 commit
  29. 20 Feb, 2013 1 commit
  30. 08 Jan, 2013 1 commit
  31. 24 Nov, 2012 1 commit
    • Ander Conselvan de Oliveira's avatar
      compositor: Move clearing of primary plane damage to the backends · 0a887728
      Ander Conselvan de Oliveira authored
      Backends may move surfaces to different planes, in which case damage is
      generated in the primary plane. This damage is usually passed to the
      renderer, but in some cases the backend may decide to not render
      anything (that's the case when drm compositor scans out a client
      buffer). In that case the damage on the primary plane would be
      discarded, leading to artifacts later.
      
      This patch makes the backend's responsibility to clear the damage on
      the primary plane, so that unrendered damage is kept for as long as
      necessary.
      0a887728
  32. 08 Nov, 2012 1 commit
    • Ander Conselvan de Oliveira's avatar
      Add a headless backend · 11f8d403
      Ander Conselvan de Oliveira authored
      Add a headless backend and a noop renderer, mainly for testing
      purposes. Although no rendering is performed with this backend,
      this allow some of the code paths inside Weston and shm clients
      to be tested without any windowing system or any need for drm
      access.
      11f8d403