1. 22 Jul, 2016 4 commits
  2. 13 Jul, 2016 4 commits
  3. 12 Jul, 2016 2 commits
  4. 11 Jul, 2016 1 commit
  5. 09 Jul, 2016 3 commits
    • Bryce Harrington's avatar
      rdp: Check for non-numeric value in RDP_FD env var · bac72b29
      Bryce Harrington authored
      strtoul(nptr, endptr, ...) will set *endptr to nptr in the case of where
      no digits were read from the string, and return 0.  Running with
      RDP_FD=foo would thus result in fd=0 being specified to
      freerdp_peer_new(), which is unlikely to be the user's intent.
      Signed-off-by: default avatarBryce Harrington <bryce@osg.samsung.com>
      bac72b29
    • Bryce Harrington's avatar
      multi-resource: Check for no digits in time description · 9c09fe70
      Bryce Harrington authored
      strtoul(nptr, endptr, ...) will set *endptr to nptr in the case of where
      no digits were read from the string.  E.g. "foo:bar" should trigger an
      error, instead of being read as "0:0" and allowed through.
      Signed-off-by: default avatarBryce Harrington <bryce@osg.samsung.com>
      9c09fe70
    • Bryce Harrington's avatar
      option-parser: Require integer option string values to be base-10 · f6051cba
      Bryce Harrington authored
      The third arg to strtol() specifies the base to assume for the number.
      When 0 is passed, as is currently done in option-parser.c, hexadecimal
      and octal numbers are permitted and automatically detected and
      converted.
      
      In weston and the weston clients and tests using option-parser.c, the
      options are all things that can be expected to be specified in base 10:
      widths, heights, counts, scales, font sizes, ports, ttys, connectors,
      etc.  The subsurfaces client uses two modes, limited to values 0 and 1
      only.  The zuc testsuite has a --random parameter for specifying a seed,
      which is the only option where using hexadecimal or octal numbers might
      conceivably happen.
      
      The benefit of limiting this to base-10 is to eliminate surprises when
      parsing numbers from the command line.  Also, by making the code
      consistent with other usages of strtol/strtoul, it may make it possible
      to factor out the common code in the future.
      Signed-off-by: default avatarBryce Harrington <bryce@osg.samsung.com>
      f6051cba
  6. 08 Jul, 2016 1 commit
  7. 07 Jul, 2016 5 commits
  8. 06 Jul, 2016 1 commit
  9. 05 Jul, 2016 2 commits
  10. 04 Jul, 2016 1 commit
  11. 01 Jul, 2016 8 commits
  12. 30 Jun, 2016 2 commits
  13. 29 Jun, 2016 6 commits
    • Pekka Paalanen's avatar
      tests: implement visualize_image_difference() · a5bb91dc
      Pekka Paalanen authored
      Useful for pointing out where the image comparisons fail.
      
      Internal-screenshot-test is modified to save the visualization if the
      test fails.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      a5bb91dc
    • Pekka Paalanen's avatar
      tests: make screenshooting return a buffer · 365c1296
      Pekka Paalanen authored
      Screenshooting does not involve creating a wl_surface, so using struct
      surface is superfluous.
      
      Return a struct buffer instead. It could have been just a
      pixman_image_t, but setting up proper destruction would be a bit more
      work. Should not hurt to keep the wl_buffer around until the user is
      ready to free the image.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      365c1296
    • Pekka Paalanen's avatar
      tests: convert image saver to pixman · fd10ef0f
      Pekka Paalanen authored
      This rewrites write_surface_as_png() into write_image_as_png(), which
      operates on a pixman_image_t instead of a struct surface.
      
      This is part of the migration to use pixman_image_t everywhere without
      superfluous parameters/members.
      
      Now the image saving handles more than just ARGB32 format, presumably.
      At least it does not assume everything is always ARGB32.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      fd10ef0f
    • Pekka Paalanen's avatar
      tests: convert reference image loader to pixman · 289fdeb0
      Pekka Paalanen authored
      This rewrites load_surface_from_png() to load_image_from_png(), to
      return a pixman_image_t instead of a struct surface.
      
      A loaded image has no need for wl_buffer or wl_surface or any of the
      associated attributes. This is part of unifying to make everything use
      pixman_image_t.
      
      cairo_surface_flush() is added, because Cairo documentation for
      cairo_image_surface_get_data() says you have to flush after drawing,
      before using the data. It is unclear if loading a PNG counts as drawing,
      so stay on the safe side.
      
      load_image_from_png() now pays attention to the pixel format returned by
      Cairo, which seems to come out as CAIRO_FORMAT_RGB24 in
      internal-screenshot-test, not as CAIRO_FORMAT_ARGB32 as expected. I do
      not know if Cairo actually guarantees the x8/a8 channel to be 0xff for
      RGB24, but better to not trust it. Therefore the image is explicitly
      converted to a8r8g8b8 as needed. This also adds support for loading A8
      and RGB16_565 images, provided that Cairo delivers them.
      
      The cairo surface is now wrapped directly into a pixman_image_t. If the
      pixel format conversion is not needed, this eliminates a copy of the
      image data. The Cairo surface will get automatically destroyed with the
      Pixman image.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      289fdeb0
    • Pekka Paalanen's avatar
      tests: rewrite check_surfaces_*() API · 47d68dae
      Pekka Paalanen authored
      check_surfaces_geometry() is removed as it was not used by anything, and
      unlikely would be.
      
      check_surfaces_equal() is merged into check_surfaces_match_in_clip(),
      passing a NULL clip means to compare whole images.
      
      check_surfaces_match_in_clip() is converted to work on pixman_image_t
      instead of struct surface. The function is only concerned about
      comparing images in memory, and does not care about a wl_buffer or a
      wl_surface.
      
      The verbosity of image comparisons is greatly reduced. An image mismatch
      no longer prints a flood of raw pixel values. This will be replaced
      later with a function writing out an error image instead.
      
      Degenerate comparisons are no longer accepted, be that clip outside
      images or zero area. Those are an indication of a programmer error.
      
      The pixel format assumptions are made more visible in the code.
      
      A new internal helper image_check_get_roi() computes and verifies the
      area to be compared. Image iterator helper makes it simpler to write
      manual pixel-poking loops.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      47d68dae
    • Pekka Paalanen's avatar
      tests: let create_shm_buffer() handle any format · 2be0c981
      Pekka Paalanen authored
      Change create_shm_buffer() to handle any pixel format known to Pixman.
      Presumably in the future we might want to test e.g. RGB565 content with
      screenshot tests.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      2be0c981