Skip to content
  1. Mar 17, 2020
  2. Mar 09, 2020
  3. Mar 05, 2020
  4. Feb 28, 2020
    • 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#52
      
      
      
      Signed-off-by: default 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#52
      
      
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      97359ba5
  5. Feb 27, 2020
    • Pekka Paalanen's avatar
      tests: expand allowed pixel fuzz for GL · 20026a55
      Pekka Paalanen authored
      
      
      Running with Mesa 20.1.0-devel (git-c7617d8908) GL renderer:
      Radeon RX 550 Series (POLARIS11, DRM 3.27.0, 4.19.0-2-amd64, LLVM 8.0.1)
      
      I found output-tranform test (a future patch) to produce exactly this much more
      difference between Pixman and GL rendererers.
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      20026a55
    • Pekka Paalanen's avatar
      tests: implement client_destroy() · 080d85b8
      Pekka Paalanen authored
      
      
      It turns out that if the client is not explicitly destroyed, it will remain
      connected until the compositor shuts down because there is no more a client
      process that would terminate.
      
      Usually this is not a problem, but if a test file has multiple screenshooting
      tests, the windows from earlier tests in the file will remain on screen. That
      is not wanted, hence implement client destruction.
      
      To properly destroy a client, we also need a list of outputs. They used to be
      simply leaked. This does not fix wl_registry.global_remove for wl_outputs, that
      is left for a time when a test will actually need that.
      
      This patch makes only ivi-shell-app test use the new client_destroy() to show
      that it actually works. The added log scopes prove it: destroy requests get
      sent. Sprinkling client_destroy() around in all other tests is left for a time
      when it is actually necessary.
      
      ivi-shell-app is a nicely simple test doing little else, hence I picked it.
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      080d85b8
    • Pekka Paalanen's avatar
      tests: re-order test naming pattern · 444f1a8e
      Pekka Paalanen authored
      
      
      The string from get_test_name() can be used for writing screenshot files and
      others. Starting the name with the fixture number makes an alphabetized listing
      of output files look unorganized.
      
      Let's change the test name to begin with the test (source) name with fixture
      and element numbers as suffixes. That makes a file listing easier to look
      through, when you have multiple tests each saving multiple screenshot files.
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      444f1a8e
    • Pekka Paalanen's avatar
      tests: add get_test_fixture_index() · 1eb30468
      Pekka Paalanen authored
      
      
      A future test wants to access the fixture data array for the currently running
      fixture index to log the test description. This patch provides access to the
      array index.
      
      Rather than adding more gloabl variables, I changed the type of the existing
      one which feels slightly cleaner.
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      1eb30468
    • Pekka Paalanen's avatar
      tests: add scale and transform compositor options · 0ce5a19b
      Pekka Paalanen authored
      
      
      With these, a test can initialize the headless-backend with non-default scale
      and transform which allows testing output scales and transforms.
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      0ce5a19b
    • Pekka Paalanen's avatar
      compositor: add scale cmdline option for headless · dd84ecf4
      Pekka Paalanen authored
      
      
      The test suite wants to start using different output scales, and this is the
      easiest API to configure it.
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      dd84ecf4
    • Pekka Paalanen's avatar
      tests: allow verify_screen_content() w/o ref image · 636fc15f
      Pekka Paalanen authored
      
      
      Allow the reference image to be NULL or missing so that it does not even
      attempt to load a reference image or compare it. You cannot just point the
      reference image to an arbitrary image because the comparison functions can
      abort due to size mismatch. This makes bootstrapping new tests easier when you
      do not yet have a reference image.
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      636fc15f
    • Pekka Paalanen's avatar
      tests: rename check_screen() to verify_screen_content() + doc · 7009806b
      Pekka Paalanen authored
      
      
      The old name felt too... short.
      
      The return type is changed to bool; fits better for a success/failure.
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      7009806b
    • Pekka Paalanen's avatar
      tests: move check_screen() into client helpers · 9b682302
      Pekka Paalanen authored
      
      
      This will be useful in more tests.
      
      No changes to the code, aside from dropping one 'static'.
      
      Copyright 2017 is taken from git-blame of the moved code.
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      9b682302
    • Pekka Paalanen's avatar
      Redefine output rotations · 8060d826
      Pekka Paalanen authored and Daniel Stone's avatar Daniel Stone committed
      It was discovered in issue #99 that the implementations of the 90 and 270
      degree rotations were actually the inverse of what the Wayland specification
      spelled out. This patch fixes the libweston implementation to follow the
      specification.
      
      As a result, the behaviour of the the weston.ini transform key also changes. To
      force all users to re-think their configuration, the transform key values are
      also changed. Since Weston and libweston change their behaviour, the handling
      of clients' buffer transform changes too.
      
      All the functions had their 90/270 cases simply swapped, probably due to
      confusion of whether WL_OUTPUT_TRANSFORM_* refers to rotating the monitor or
      the content.
      
      Hint: a key to understanding weston_matrix_rotate_xy(m, c, s) is that the
      rotation matrix is formed as
      
        c -s
        s  c
      
      that is, it's column-major. This fooled me at first.
      
      Fixing window.c fixes weston-terminal and weston-transformed.
      
      In simple-damage, window_get_transformed_ball() is fixed to follow the proper
      transform definitions, but the fix to the viewport path in redraw() is purely
      mechanical.  The viewport path looks broken to me in the presence of any
      transform, but it is not this patch's job to fix it.
      
      Screen-share fix just repeats the general code fix pattern, I did not even try
      to understand that bit.
      
      #99
      
      
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      8060d826
    • Pekka Paalanen's avatar
      libweston: document weston_transformed_*() · 0df44779
      Pekka Paalanen authored and Daniel Stone's avatar Daniel Stone committed
      
      
      Clarifies which direction the transformation happens. All exported function
      need documentation.
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      0df44779
    • Pekka Paalanen's avatar
      clients: transformed does not recognize -d · 8555877c
      Pekka Paalanen authored and Daniel Stone's avatar Daniel Stone committed
      
      
      It has no such command line option.
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      8555877c
  6. Feb 26, 2020
  7. Feb 18, 2020
  8. Feb 10, 2020
  9. Feb 06, 2020
    • Philipp Zabel's avatar
      build: add rpath to modules that use symbols from libexec_weston · 4b1de011
      Philipp Zabel authored and Pekka Paalanen's avatar Pekka Paalanen committed
      
      
      The cms-static, desktop-shell, hmi-controller, ivi-shell, and screen-share
      modules use symbols from libexec_weston, e.g.:
      
        $ ldd /usr/lib/x86_64-linux-gnu/weston/desktop-shell.so | grep "not found"
        	libexec_weston.so.0 => not found
      
      Loading these modules from weston happens to work because the weston executable
      itself links against libexec_weston, and has an rpath set. Still, these modules
      depend on a library in a non-standard location. Adding an rpath could help
      static checkers to make sure all shared objects' dependencies are present.
      
      Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
      4b1de011
  10. Feb 05, 2020
    • Pekka Paalanen's avatar
      tests: run subsurface-shot on GL too · 741fca40
      Pekka Paalanen authored and Pekka Paalanen's avatar Pekka Paalanen committed
      
      
      This adds the necessary fuzz to image matching to let GL-renderer pass.
      The difference is due to rounding. weston-test-desktop-shell.c uses
      
      weston_surface_set_color(dts->background_surface, 0.16, 0.32, 0.48, 1.);
      
      to set the background color. Pixman-renderer will truncate those to uint8, but
      GL-renderer seems to round instead, which causes the +1 in background color
      channel values.
      
      	0.16 * 255 = 40.8
      	0.32 * 255 = 81.6
      	0.48 * 255 = 122.4
      
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      741fca40
Loading