Skip to content
  • Pekka Paalanen's avatar
    tests/color-icc-output: extract image-iter.h · 9b82bfae
    Pekka Paalanen authored and Pekka Paalanen's avatar Pekka Paalanen committed
    
    
    Move the struct image_header and get_image_prop() into a header where we
    can share these useful helpers between more test code. While doing that,
    drop the unused field 'depth', rename into image_header_from(), and
    introduce a helper to get u32 pointer to the beginning of a row. These
    helpers should make pixel iterating code easier to read and safer (less
    room for mistakes in address computations, and asserts).
    
    Use the shared 'struct image_header' instead of the local one. The
    intention is to make the code easier to read by using the same helpers
    everywhere.
    
    Width, height and stride use type 'int' because Pixman API uses that
    too.
    
    Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    9b82bfae
Loading