Skip to content
Snippets Groups Projects
  1. Feb 06, 2024
    • Loïc Molinari's avatar
      tests: Add box32 quad clipper tests · 5516527f
      Loïc Molinari authored and Pekka Paalanen's avatar Pekka Paalanen committed
      
      Add a few tests ensuring the box32 quad clipping wrapper works as
      expected.
      
      Signed-off-by: default avatarLoïc Molinari <loic.molinari@collabora.com>
      5516527f
    • Loïc Molinari's avatar
      gl-renderer: Fix quad clipper non-zero area check · e82ce803
      Loïc Molinari authored and Pekka Paalanen's avatar Pekka Paalanen committed
      
      The non-zero area check of clipper_quad_clip() is incorrect for quads
      initialized with a polygon starting with a vertical edge. In order to
      handle polygons starting with an horizontal edge and polygons starting
      with a vertical one, it must check opposite vertices for equality.
      
      The test previously described as "Box intersects entire smaller
      aligned quad" is now described as "Clockwise winding and top/left
      initial vertex". This test keeps the same values as before but all
      combinations of winding order and first edge orientations are
      also tested. The QUAD() macro isn't used anymore to do so.
      
      Signed-off-by: default avatarLoïc Molinari <loic.molinari@collabora.com>
      e82ce803
    • Loïc Molinari's avatar
      tests: Add quad clipper tests · 1f9637ec
      Loïc Molinari authored and Pekka Paalanen's avatar Pekka Paalanen committed
      
      Add quad clipping tests checking intersections at all edges and
      corners of axis-aligned and unaligned quads with negative and positive
      values.
      
      Signed-off-by: default avatarLoïc Molinari <loic.molinari@collabora.com>
      1f9637ec
    • Loïc Molinari's avatar
      tests: Improve general purpose clipper tests · 60877f5f
      Loïc Molinari authored and Pekka Paalanen's avatar Pekka Paalanen committed
      
      Simplify box and quad declarations using dedicated macros.
      
      Hard-coded literals are used instead of preprocessor constants for the
      sake of brevity and because, as several new tests will be added, it
      appears to be easier to understand those when values are inlined.
      
      Descriptions have been revised to better understand the intent of each
      test. Previous descriptions used a coord system with Y pointing up,
      new descriptions use Y pointing down in order to improve consistency
      with the rest of the code base and to have a common ground when
      talking about winding order.
      
      All the tests keep the same input values with the exception of the
      last 2 tests with (new) descriptions: "Rotated quad with edges
      adjacent to box corners" and "Rotated quad with edges cutting out box
      corners". These tests had a different winding order and have been
      modified so that all tests use a clockwise order (new axis
      convention). The last test also gets a counter-clockwise version in
      order to ensure the opposite winding order is correctly supported too.
      
      Signed-off-by: default avatarLoïc Molinari <loic.molinari@collabora.com>
      60877f5f
    • Loïc Molinari's avatar
      tests: Improve clipper test function · aca0b69a
      Loïc Molinari authored and Pekka Paalanen's avatar Pekka Paalanen committed
      
      When the first vertex passed to the clipper is clipped into two
      vertices, the second vertex can sometimes be emitted as the first
      clipped vertices while the first vertex is emitted as the last one. A
      new utility function assert_vertices() is added to handle that
      case. The function also checks the number of clipped vertices and the
      clipped vertices in one go.
      
      Signed-off-by: default avatarLoïc Molinari <loic.molinari@collabora.com>
      aca0b69a
  2. Feb 02, 2024
  3. Feb 01, 2024
  4. Jan 30, 2024
  5. Jan 29, 2024
    • Pekka Paalanen's avatar
      backend-drm: rename eotf_list to str · f8807320
      Pekka Paalanen authored
      
      I want re-use this variable for printing the colorimetry mode list as
      well in a future patch, so a generic name is less confusing.
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      f8807320
    • Pekka Paalanen's avatar
      backend-drm: skip EDID parsing if no change · fc0a74a4
      Pekka Paalanen authored
      
      Performance-wise this is moot, but since we are detecting if the raw
      EDID data changed, might as well use it.
      
      Now we have a path where the head's device_changed is almost guaranteed
      since EDID changed, and that's useful for the next patch.
      
      We can only do this, because the core initializes a head with values
      that we would be setting anyway when EDID is missing, e.g. disconnected
      head on compositor start-up.
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      fc0a74a4
    • Pekka Paalanen's avatar
      backend-drm: store EDID data · 2c0a9c06
      Pekka Paalanen authored
      
      Store the EDID data as-is, so that we can tell when the EDID blob has
      changed. This is not too useful yet, because all the weston_head_set_*()
      API raises the device_changed flag only if the information actually
      changes. However, I want to expose the libdisplay-info di_info structure
      through weston_head, and those cannot be (as) easily compared.
      
      We need to know when the EDID blob changes, so we can call
      weston_head_set_device_changed() appropriately when updating di_info.
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      2c0a9c06
  6. Jan 26, 2024
    • Pekka Paalanen's avatar
      tests: conditionally skip part of alpha-blending · 4a028ade
      Pekka Paalanen authored
      
      One of the three fixture setups of alpha-blending test requires
      color-lcms.so. If color-lcms.so is not built, that fixture fails.
      
      Make it skip as necessary, making the test suite pass with
      color-management-lcms=false build option.
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      4a028ade
    • Pekka Paalanen's avatar
      tests: remove color-manager test · f18455c3
      Pekka Paalanen authored
      
      This is very trivial test, which does not skip correctly when built with
      color-management-lcms=false. It fails instead.
      
      Since alpha-blending test already covers everything that color-manager
      test did, remove color-manager test.
      
      My editor eliminated a stray whitespace, too.
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      f18455c3
    • Nicholas Niro's avatar
      man: Document the new 'command input' feature · ab747b7c
      Nicholas Niro authored and Pekka Paalanen's avatar Pekka Paalanen committed
      
      Added an entry with examples into the man page and also
      into frontend/main.c for the '--help' interface.
      
      Signed-off-by: default avatarNicholas Niro <blowfist@xroutine.net>
      ab747b7c
    • Nicholas Niro's avatar
      compositor: Add support for a command input. · 288f5522
      Nicholas Niro authored and Pekka Paalanen's avatar Pekka Paalanen committed
      
      This command is being executed in parallel with the westen instance,
      just like the autolaunch config.
      
      I recently came across the kiosk-shell and found out I could start a program exclusive
      weston instance using it and that opened my eyes to new possibilities.
      
      With the desktop-shell, it is necessary to set up quite a few options like the panel launchers,
      the background image/color and a few other things and that indeed make the configuration file mandatory.
      
      With the kiosk-shell all you really care about is the underlying program,
      the vast majority of the configuration file options are not relevant for that shell.
      That made me wonder how convenient it would be to forego the configuration file
      and implement the autolaunch option directly in the weston program. That indeed worked pretty
      well and that is why I decided to propose this merge request.
      
      I think this avenue opens up a different set of uses cases for weston where rather than just have one
      "big" desktop-shell instance, we could have multiple smaller and potentially specific usage instances.
      Yes, it can be done with configuration files currently. But what it boils down to is convenience.
      Maybe this convenience will enable other people to start more than just one weston instance
      in the future. For instance, to quickly watch an image or opening up a pdf file.
      
      This patch was made in a matter that is meant to be consistent with the intuitive
      way other programs accept a command input, like so :
      
      weston <some options> -- some_command option1 ... optionN
      
      Further work would be necessary to remove the requirement for the '--'
      option. To do that, we would need to check if the option is a valid command
      and not just a mistyped option.
      
      There may be some conflict with the current autolaunch implementation.
      I'm not sure if both 'command' and 'autolaunch' could be used at the
      same time using this implementation. I think it would be necessary to
      have a distinct watch and pid variable in the 'wet' context variable
      for the command to support this.
      
      Signed-off-by: default avatarNicholas Niro <blowfist@xroutine.net>
      288f5522
    • Nicholas Niro's avatar
      option-parser: Add support for the '--' options · 10a455f2
      Nicholas Niro authored and Pekka Paalanen's avatar Pekka Paalanen committed
      
      This toggles parse_options to ignore the rest of the remaining
      options.
      
      Signed-off-by: default avatarNicholas Niro <blowfist@xroutine.net>
      10a455f2
  7. Jan 25, 2024
  8. Jan 22, 2024
  9. Jan 19, 2024
  10. Jan 16, 2024
  11. Jan 15, 2024
  12. Jan 12, 2024
  13. Jan 11, 2024
    • Robert Mader's avatar
      backend-drm: Don't force non-opaque overlays to primary plane · 5a2509ff
      Robert Mader authored
      
      If a view is non-opaque - such as an overlay over a video - we shouldn't
      force it to be on the primary plane, as that's where the underlying
      content should be placed, such as the video view.
      
      dc0de9ee already mentioned: "This check should be changed in future to
      only filter for opaque views, but that's for another time."
      
      Adding "Fixes" at this is arguably a bug fix:
      Fixes: dc0de9ee (backend-drm: Move overlay vs. primary plane check earlier)
      Fixes: 2538aacc (backend-drm: Construct a zpos candidate list of planes)
      
      Signed-off-by: default avatarRobert Mader <robert.mader@collabora.com>
      5a2509ff
  14. Jan 10, 2024
    • Derek Foreman's avatar
      libweston/backends: Move damage flush into backends · 2abe4efc
      Derek Foreman authored
      
      Currently we flush damage for the "primary plane" every repaint, but this
      is folly.
      
      The drm backend may skip rendering entirely if using an all-planes
      composition. This could leave the renderer plane in a messy state if a
      surface on an overlay plane disappears.
      
      Instead, let the backends flush the primary plane damage when they know
      they need to render.
      
      Fixes #864
      
      Signed-off-by: default avatarDerek Foreman <derek.foreman@collabora.com>
      2abe4efc
  15. Jan 09, 2024
  16. Jan 05, 2024
  17. Dec 18, 2023
  18. Dec 15, 2023
Loading