1. 08 Jul, 2020 3 commits
  2. 06 Jul, 2020 1 commit
  3. 30 Jun, 2020 1 commit
    • Vlad Zahorodnii's avatar
      Provide an easy way to monitor buffer size changes · fd995084
      Vlad Zahorodnii authored
      The main purpose behind the kwaylandserver library is to provide a set
      of re-usable wayland compositor extension implementations. However, it's
      worth noting that the design of kwaylandserver is far from perfect at
      the moment.
      
      KWaylandServer tries to hide all low level wayland details from the
      compositor. But it's not the case with buffers, which diminishes the
      whole point behind the library.
      
      Creating OpenGL textures from Wayland buffers is the responsibility of
      the compositor. So, when it comes to client buffers, we are one foot in
      KWaylandServer, and the other foot in the compositor.
      
      Since the surface size is a logical size, the compositor can't use it
      for allocating memory for OpenGL textures. This change adds the buffer
      size property in SurfaceInterface that can be used for allocating memory
      for textures as well as monitoring buffer size changes.
      
      I must say that the introduction of the buffer size property is a crude
      hack because BufferInterface just needs to provide an OpenGL texture for
      each plane. The main blocker for that is that it would involve moving
      the backend, the compositor, and the wayland bits in the same place, for
      example kwayland-server or ultimately kwin.
      fd995084
  4. 24 Jun, 2020 2 commits
    • Vlad Zahorodnii's avatar
      Document the buffer transform property · 39a27ec2
      Vlad Zahorodnii authored
      The buffer transform is a pretty confusing thing, so document it in
      order to avoid misleading people.
      39a27ec2
    • Vlad Zahorodnii's avatar
      Rename buffer-specific surface properties · 47f80b99
      Vlad Zahorodnii authored
      The buffer scale and the buffer transform property specify transforms
      that had been applied to the buffer's contents. Neither one of those
      properties apply to the surface, in other words the buffer transform
      property doesn't indicate that the surface was rotated or flipped or both.
      
      This change doesn't gain anything in terms of new features, etc. It just
      attempts to make things more clear.
      47f80b99
  5. 23 Jun, 2020 1 commit
  6. 22 Jun, 2020 2 commits
  7. 19 Jun, 2020 3 commits
    • Vlad Zahorodnii's avatar
      Drop SurfaceInterface::inputIsInfitine · 832f5bdd
      Vlad Zahorodnii authored
      Since we don't guarantee SC and BC in KWaylandServer, we can drop
      SurfaceInterface::inputIsInfitine().
      832f5bdd
    • David Edmundson's avatar
      Assume enabled if DPMS is not supported · f26c0370
      David Edmundson authored
      This fixes several unit tests in kwin where the virtual output is not
      considered enabled causing behavioural changes.
      f26c0370
    • Vlad Zahorodnii's avatar
      Introduce surface-to-buffer and buffer-to-surface matrices · 4d210a94
      Vlad Zahorodnii authored
      The compositor needs to monitor changes in the mapping between the
      surface local coordinates and the buffer coordinates because texture
      coordinates correspond to the latter. One way to do it is to monitor
      things such as the surface size, the buffer size, the buffer scale,
      etc. The main problem with doing so is that there are so many factors
      that contribute to how mapping between the surface local coordinate
      space and the buffer coordinate space is performed.
      
      In order to provide a generic way for monitoring changes in the mapping
      between the surface local coordinate space and the buffer coordinate
      space, this patch introduces two new matrices. The first one specifies
      how the surface-local coordinates are mapped to buffer coordinates, and
      the other one specifies how to map the buffer coordinates to surface
      local coordinates.
      
      With the new two matrices, the compositor has a generic way to get
      notified when it has to re-compute texture coordinates.
      4d210a94
  8. 17 Jun, 2020 2 commits
  9. 16 Jun, 2020 1 commit
  10. 15 Jun, 2020 1 commit
  11. 03 Jun, 2020 2 commits
  12. 02 Jun, 2020 1 commit
    • Vlad Zahorodnii's avatar
      Add support for the wp_viewporter protocol · b9381012
      Vlad Zahorodnii authored
      The wp_viewporter compositor extension allows clients to crop and scale
      their surface. It can be useful for applications such as video players
      because it may potentially reduce their power usage.
      b9381012
  13. 01 Jun, 2020 9 commits
  14. 31 May, 2020 1 commit
  15. 29 May, 2020 2 commits
  16. 28 May, 2020 5 commits
  17. 26 May, 2020 3 commits
    • David Edmundson's avatar
      Add DataControl iface · d8b553e7
      David Edmundson authored
      Summary:
      This patch makes use of wlroot's DataControl interface to support
      clipboard management.
      
      Unlike wl_data_device clipboards are sent on every change to all
      watchers.
      If the data device has a selection set it updates immediately.
      
      Because it was started a year ago it uses the existing style of
      wrapping objects. The unit test uses the new approach.
      
      Test Plan:
      Updated kwin
      used wlroot's wl-copy, wl-paste which are xclip replacements to
      show that the clipboard updated correctly
      
      Reviewers: #kwin
      
      Differential Revision: https://phabricator.kde.org/D29330
      d8b553e7
    • David Edmundson's avatar
      Introduce AbstractDataSource round the DataSourceInterface · e08b201b
      David Edmundson authored
      Summary:
      Clipboard managers and middle click paste are new protocols.
      
      We want to be able to copy from a clipboard manager to a regular
      clipboard and vice versa without duplicating loads of code.
      
      If we support kliper's "syncronise contents of the clipboard and
      selection" inside the compositor that would become an unmanageable amount
      of combinations.
      
      It also potentially allows the idea of our XWayland bridge not being a
      wayland client and simplifying that code.
      
      Test Plan: Unit test passes
      
      Reviewers: #kwin
      
      Subscribers: zzag
      
      Differential Revision: https://phabricator.kde.org/D29329
      e08b201b
    • David Edmundson's avatar
      Manage active selection as active DataSource than DataDevice · f9da1809
      David Edmundson authored
      Summary:
      A DataDevice will have zero or one active DataSource as the seclection.
      
      In the existing code we track the current data device then update it to
      the newest data device
      when the source inside a data device changes.
      
      If we store the active data source inside Seat instead of the device
      everything becomes
      somewhat simpler and safer.
      
      An entire unit test vanishes as that case of an externally set
      DataDevice with no source
      can no longer happen.
      
      There's also a lot of duplication that's been merged in this patch so we
      have one path.
      
      There are some technical behavioural changes in particular we do cleanup
      when the
      source vanishes rather than the data device, but if anything that seems
      safer and more correct.
      
      It's a precursor for introducing an abstraction class round the source
      without needing to meddle
      with too much code.
      
      Test Plan: Relevant unit tests passed, ran with it for a while with no
      issue.
      
      Reviewers: #kwin
      
      Differential Revision: https://phabricator.kde.org/D29328
      f9da1809