1. 02 May, 2019 1 commit
    • Antonio Borneo's avatar
      log: remove "%m" from format strings by using strerror(errno) · 39578636
      Antonio Borneo authored
      The printf() format specifier "%m" is a glibc extension to print
      the string returned by strerror(errno). While supported by other
      libraries (e.g. uClibc and musl), it is not widely portable.
      
      In Weston code the format string is often passed to a logging
      function that calls other syscalls before the conversion of "%m"
      takes place. If one of such syscall modifies the value in errno,
      the conversion of "%m" will incorrectly report the error string
      corresponding to the new value of errno.
      
      Remove all the occurrences of the specifier "%m" in Weston code
      by using directly the string returned by strerror(errno).
      While there, fix some minor indentation issue.
      Signed-off-by: Antonio Borneo's avatarAntonio Borneo <borneo.antonio@gmail.com>
      39578636
  2. 26 Sep, 2017 1 commit
  3. 18 Sep, 2017 1 commit
  4. 22 Jul, 2016 2 commits
  5. 25 Apr, 2016 1 commit
  6. 16 Jun, 2015 2 commits
  7. 15 Jun, 2015 1 commit
  8. 15 May, 2015 1 commit
    • Michael Vetter's avatar
      remove trailing whitespaces · 2a18a528
      Michael Vetter authored
      Remove trailing whitespaces because they are not needed and jumping to
      the end of al ine should do just that and not jump to the whitespace.
      2a18a528
  9. 19 Aug, 2014 1 commit
  10. 05 Jul, 2014 1 commit
  11. 07 Apr, 2014 2 commits
    • Andrew Wedgbury's avatar
      Make sure config.h is included before any system headers · 9cd661e7
      Andrew Wedgbury authored
      There was an issue recently in screen-share.c where config.h was not
      being included, resulting in the wrong definition for off_t being used on
      32 bit systems. I checked and I don't think this problem is happening
      elsewhere, but to help avoid this sort of problem in the future, I went
      through and made sure that config.h is included first whenever system
      headers are included.
      
      The config.h header should be included before any system headers, failing
      to do this can result in the wrong type sizes being defined on certain
      systems, e.g. off_t from sys/types.h
      Signed-off-by: default avatarAndrew Wedgbury <andrew.wedgbury@realvnc.com>
      9cd661e7
    • Neil Roberts's avatar
      nested: Disable cairo on the subsurfaces · 40d02288
      Neil Roberts authored
      The subsurface widgets on the nested example aren't using Cairo to
      render so we should turn it off to prevent the toy toolkit from
      creating a redundant extra surface for it. This is particularly
      important since Mesa commit 6c9d6898fdfd7e2 because the surface that
      the toolkit tries to create is zero-sized and that patch prevents that
      from working. This was causing weston-nested to crash.
      40d02288
  12. 20 Jan, 2014 1 commit
  13. 17 Dec, 2013 1 commit
  14. 05 Dec, 2013 8 commits
    • Neil Roberts's avatar
      nested: Add an option to disable subsurfaces · a5059eb1
      Neil Roberts authored
      This adds a -b option to force the nested compositor example to use
      the old blit renderer even if the appropriate extensions are
      available.
      a5059eb1
    • Neil Roberts's avatar
      nested: Add a renderer using subsurfaces · 1f020a1f
      Neil Roberts authored
      Adds a second renderer implementation to the nested compositor example
      that creates a subsurface for each of the client's surfaces. The
      client buffers are directly attached to the subsurface using the
      EGL_WL_create_wayland_buffer_from_image extension instead of blitting
      them in the redraw_handler.
      
      The new renderer is always used if the parent compositor supports the
      wl_subcompositor protocol and the EGL extension is available.
      Otherwise it will fall back to the blit renderer.
      1f020a1f
    • Neil Roberts's avatar
      nested: Add a ‘renderer’ mechanism with a vtable · 47b87d5e
      Neil Roberts authored
      Eventually the nested compositor example will want to be able to cope
      with either rendering as it does now with a blit to an intermediate
      surface or by attaching the client buffers directly to a subsurface
      without copying. This patch moves the code that is specific to the
      blitting mechanism into a separate set of functions with a vtable to
      make it easier to add the second way of rendering in a later patch.
      47b87d5e
    • Neil Roberts's avatar
      nested: Move the frame callback list to the surface · f9b2541d
      Neil Roberts authored
      Previously the frame callback list was tracked as part of the global
      compositor state. This patch moves the list to be part of the surface
      state like it is in Weston. The frame callback now iterates the list
      of surfaces to flush all of the callbacks. This change will be useful
      when the example is converted to use subsurfaces so that it can have a
      separate frame callback for the subsurface and flush the list for an
      individual client surface rather than flushing globally.
      f9b2541d
    • Neil Roberts's avatar
      nested: Add damage tracking to the nested compositor example · 28557663
      Neil Roberts authored
      The nested compositor example now responds to damage requests and
      tracks them in the pending buffer state. This isn't currently used for
      anything and it is immediately discarded when the surface is commited
      but it will be used later when the example is converted to use
      subsurfaces.
      28557663
    • Neil Roberts's avatar
      nested: Add double-buffered state semantics to the nested example · 15a8d340
      Neil Roberts authored
      The buffer and frame callback state on the surfaces in the nested
      compositor example are now double-buffered so that they only take
      effect when the commit request is received. This doesn't really make
      much difference for the current state that the example has but it will
      be useful when more state is added in later patches.
      15a8d340
    • Neil Roberts's avatar
      nested: Add the buffer reference semantics from Weston · 6bf23879
      Neil Roberts authored
      This copies the buffer reference busy count implementation from Weston
      to the nested compositor example and adds an internal nested_buffer
      struct that we could eventually use to attach data. This will be
      useful to adapt the example to use subsurfaces so that we can attach
      our compositor-side buffer to the resource.
      6bf23879
    • Neil Roberts's avatar
      nested: Remove the surface from the surface list when destroyed · 8fbe3a68
      Neil Roberts authored
      Otherwise if the surface is destroyed then it will crash when it later
      tries to render all of the surfaces. You can replicate this by doing
      killall weston-nested-client while the example is running.
      8fbe3a68
  15. 14 Oct, 2013 1 commit
  16. 10 Oct, 2013 2 commits
  17. 16 Aug, 2013 2 commits
    • Ander Conselvan de Oliveira's avatar
      nested: Fix skipping frames due to texture update without a context · d224bb92
      Ander Conselvan de Oliveira authored
      Calls into cairo-gles may change the current context, so it was only by
      chance that sometimes we had the proper one as current and updated the
      correct texture in surface_attach().
      
      In order to fix this, calling display_acquire_window_surface() before
      binding the texture for setup is necessary. However this call has the
      side effect of allocating a cairo surface for the window. At flush time,
      the existence of this surface will cause an eglSwapBuffers(), even
      if no rendering was done to it, leading to undefined contents on the
      screen. This happens when the idle redraw task runs while there is a
      pending frame callback.
      
      Workaround this by moving the texture setup from surface_attach() to the
      redraw handler, so that the cairo surface is only allocated when
      redering is done.
      d224bb92
    • Kristian H. Kristensen's avatar
  18. 13 Aug, 2013 1 commit
  19. 08 Aug, 2013 1 commit
  20. 07 Aug, 2013 2 commits
  21. 09 Jul, 2013 1 commit
  22. 25 Jun, 2013 2 commits
  23. 04 Jun, 2013 1 commit
    • Kristian H. Kristensen's avatar
      clients: Nested compositor example · 1cc5ac34
      Kristian H. Kristensen authored
      A wayland compositor doesn't provide a mechanism for buffer sharing between
      clients.  Under X, one client can render to a Pixmap and another can use it
      as a source in a subsequent drawing operations.  Wayland doesn't have a
      mechanims to share Pixmaps or textures between clients like that, but it's
      possible for one client to act as a nested compositor to another client.
      
      This less work than it sounds, since the nested compositor won't have to
      provide input devices or even any kind of shell extension.  The nested
      compositor and its client can be very tightly coupled and have very specific
      expectations of what the other process should provide.
      
      In this example, nested.c is a toytoolkit application that uses cairo-gl
      for rendering and forks and execs nested-client.c.  As it execs the client,
      it passes it one end of a socketpair that will be the clients connection
      to the nested compositor.  The nested compositor doesn't even create a
      listening socket.
      
      The client is a minimal GLES2 application, which just renders a spinning
      triangle in its frame callback.
      1cc5ac34