Commits on Source (7)
-
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: Pekka Paalanen <pekka.paalanen@collabora.com>
9b82bfae -
Replace private pixel iterator helpers with the shared ones. No change in behaviour. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
4eb70a60 -
Make use of the new type to shorten the code. No change in behaviour. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
791a6be2 -
These are the last places in weston-test-client-helper.c where using image_header_from() will reduce the code line count and simplify the code a little. No change in behaviour. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
94589497 -
Make use of the shared code instead of open-coding everywhere. This should make the code easier to read, and reduce the chance of typos if changes are needed in the future. No change in behaviour. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
884c5f80 -
Simplify the code by using ready-made helpers. This also change the loop to draw the image row by row rather than column by column. Row by row is more natural as it is linear with the memory layout. No other change in behaviour. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
67331be0 -
Simplify the code by using ready-made helpers. No change in behaviour. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
f212a703
tests/image-iter.h
0 → 100644