1. 14 May, 2020 1 commit
  2. 12 May, 2020 1 commit
  3. 07 May, 2020 2 commits
  4. 29 Apr, 2020 1 commit
    • Michael Olbrich's avatar
      compositor: fix endless recursion in scene-graph printing · ef5f3233
      Michael Olbrich authored
      If a surface has subsurfaces then the surface itself is in the subsurface
      list. To avoid printing it again there is a check to skip the child view,
      if it is the same as the current view.
      
      However, this fails when a surface with subsurfaces has two (or more) views:
      The check to skip the parent fails for the other view and the two views are
      printed again and again until a stack overflow occurs.
      
      So instead check if the parent view of the subsurface view is the current
      view. This way, any view that does not belong to a real subsurface is
      skipped.
      
      As a side effect, this ensures that each view of the subsurfaces is only
      printed once at the correct place in the hierarchy.
      Signed-off-by: Michael Olbrich's avatarMichael Olbrich <m.olbrich@pengutronix.de>
      ef5f3233
  5. 06 Apr, 2020 1 commit
  6. 30 Mar, 2020 1 commit
  7. 20 Mar, 2020 9 commits
  8. 18 Mar, 2020 1 commit
  9. 12 Mar, 2020 1 commit
    • Pekka Paalanen's avatar
      tests: add viewport test for repeat mode · 4505f811
      Pekka Paalanen authored
      This test ensures that
      	"pixman-renderer: half-fix bilinear sampling on edges"
      keeps on working.
      
      Unlike in the original report
      wayland/weston#373, here we use buffer
      scale 2 instead of output scale 2 to trigger bilinear filter. The effect is the
      same, the actual resulting image in the failing case is just a little
      different. This is so that it will be easy to add more viewport screenshooting
      tests in this program in the future.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.com>
      4505f811
  10. 11 Mar, 2020 4 commits
    • Pekka Paalanen's avatar
      tests: move fill_color into helpers · f26d17fe
      Pekka Paalanen authored
      There will be a new test program that wants to share this code.
      
      No behavioral changes.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.com>
      f26d17fe
    • Pekka Paalanen's avatar
      tests: move viewport creation into helpers · 9c267e5b
      Pekka Paalanen authored
      There will be a new test program using viewports and would like to share this
      bit of code.
      
      There are two behavioral changes:
      - Compositor wp_viewporter interface version is no longer checked.
      - client_create_viewport() does not leak the viewporter object.
      
      test_viewporter_double_create needs to call bind_to_singleton_global() itself
      so that the viewporter object still exists when the error event arrives.
      Otherwise error verification fails.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.com>
      9c267e5b
    • Pekka Paalanen's avatar
      pixman-renderer: half-fix bilinear sampling on edges · 9f53edd4
      Pekka Paalanen authored
      When weston-desktop-shell uses a solid color for the wallpaper, it creates a
      1x1 buffer and uses wp_viewport to scale that up to fullscreen. It's a very
      nice memory saving optimization.
      
      If you also have output scale != buffer scale, it means pixman-renderer chooses
      bilinear filter. Arguably pixman-renderer should choose bilinear filter also
      when wp_viewport implies scaling, but it does not. As w-d-s always sets buffer
      scale from output scale, triggering the bilinear filter needs some effort.
      
      What happens when you sample with bilinear filter from a 1x1 buffer, stretching
      it to cover a big area? Depends on the repeat mode. The default repeat mode is
      NONE, which means that samples outside of the buffer come out as (0,0,0,0).
      Bilinear filter makes it so that every sampling point on the 1x1 buffer except
      the very center is actually a mixture of the pixel value and (0,0,0,0). The
      resulting color is no longer opaque, but the renderer and damage tracking
      assume it is. This leads to the issue 373.
      
      Fix half of the issue by using repeat mode PAD which corresponds to OpenGL
      CLAMP_TO_EDGE. GL-renderer already uses CLAMP_TO_EDGE always.
      
      This is only a half-fix, because composite_clipped() cannot actually be fixed.
      It relies on repeat mode NONE to work. It would need a whole different approach
      to rendering potentially non-axis-aligned regions exactly like GL-renderer.
      
      Fixes: wayland/weston#373Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.com>
      9f53edd4
    • Daniel Stone's avatar
      compositor: Fail on invalid transform for headless · 5450456d
      Daniel Stone authored
      As in aaf35586, we want to fail when we are passed an invalid
      transform name, not just blindly configure on using the normal
      transform. The previous commit missed the callsite from the headless
      backend's command-line parsing.
      
      Fix this so that headless fails when an invalid transform is specified
      on the command line.
      Signed-off-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      5450456d
  11. 10 Mar, 2020 1 commit
  12. 06 Mar, 2020 5 commits
  13. 05 Mar, 2020 2 commits
  14. 28 Feb, 2020 2 commits
    • Pekka Paalanen's avatar
      tests: add buffer transform tests · 147e67c4
      Pekka Paalanen authored
      This patch continues the buffer and output transforms testing by iterating
      through a representative selection of buffer transforms and scales.
      
      For more details, see the previous patch "tests: add output transform tests".
      
      wayland/weston#52Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.com>
      147e67c4
    • Pekka Paalanen's avatar
      tests: add output transform tests · 97359ba5
      Pekka Paalanen authored
      This goes through all output transforms with two different buffer transforms
      and verifies the visual output against reference images.
      
      This commit introduces a new test input image 'basic-test-card.png'. It is a
      small image with deliberately odd and indivisible dimensions to provoke bad
      assumptions about image sizes. It contains red, green and blue areas which are
      actually text that makes it very obvious if you have e.g. color channels
      swapped. It has a white thick circle to highlight aspect ratio issues, and an
      orange cross to show a mixed color. The white border is for contrast and a 1px
      wide detail. The whole design makes it clear if the image happens to be rotated
      or flipped in any way.
      
      The image has one pixel wide transparent border so that bilinear sampling
      filter near the edges of the image would produce the same colors with both
      Pixman- and GL-renderers which handle the out-of-image samples fundamentally
      differently: Pixman assumes (0, 0, 0, 0) samples outside of the image, while
      GL-renderer clamps sample coordinates to the edge essentially repeating the
      edge pixels.
      
      It would have been "easy" to create a full matrix of
      every output scale & transform x every buffer scale & transform, but that
      would have resulted in 2 renderers * 8 output transforms * 3 output scales *
      8 buffer transforms * 3 buffer scales = 1152 test cases that would have all
      ran strictly serially because our test harness has no parallelism inside one
      test program. That would have been slow to run, and need a lot more reference
      images too.
      
      Instead, I chose to iterate separately through all output scales & transforms
      (this patch) and all buffer scales & transforms (next patch). This limits the
      number of test cases in this patch to 56, and allows the two test programs to
      run in parallel.
      
      I did not even pick all possible scale & transform combinations here, but just
      what I think is a representative sub-set to hopefully exercise all the code
      paths.
      
      wayland/weston#52Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.com>
      97359ba5
  15. 27 Feb, 2020 8 commits