summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2015-04-22 16:46:47 +0100
committerThomas Wood <thomas.wood@intel.com>2015-04-27 15:26:00 +0100
commit6f5d400ae9323a7c1c616d591876f29ca0ad0f10 (patch)
treee92922a737c27217485305af36fb966eab201e81 /tests
parentb769a7c96b4ccf33b9ea75f4d99856995b5ac571 (diff)
kms_rotation_crc: No need to square the buffer in paint
Now that size is calculated in a single place and correct geometry passed in, paint squares does not need to concern itself with it. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Sonika Jindal <sonika.jindal@intel.com> Reviewed-by: Sonika Jindal <sonika.jindal@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/kms_rotation_crc.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 60819b31..45a92843 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -58,15 +58,9 @@ paint_squares(data_t *data, drmModeModeInfo *mode, igt_rotation_t rotation,
cairo_rotate(cr, M_PI);
}
- /*
- * "rotation" is used for creating ref rotated fb and
- * "data->rotation" is used to determine the required size
- * while creating unrotated fb.
- */
if (rotation == IGT_ROTATION_90) {
/* Paint 4 squares with width == height in Blue, Red,
Green, White Clockwise order to look like 90 degree rotated*/
- w = h = mode->vdisplay;
igt_paint_color(cr, 0, 0, w / 2, h / 2, 0.0, 0.0, 1.0);
igt_paint_color(cr, w / 2, 0, w / 2, h / 2, 1.0, 0.0, 0.0);
igt_paint_color(cr, 0, h / 2, w / 2, h / 2, 1.0, 1.0, 1.0);
@@ -75,16 +69,12 @@ paint_squares(data_t *data, drmModeModeInfo *mode, igt_rotation_t rotation,
} else if (rotation == IGT_ROTATION_270) {
/* Paint 4 squares with width == height in Green, White,
Blue, Red Clockwise order to look like 270 degree rotated*/
- w = h = mode->vdisplay;
igt_paint_color(cr, 0, 0, w / 2, h / 2, 0.0, 1.0, 0.0);
igt_paint_color(cr, w / 2, 0, w / 2, h / 2, 1.0, 1.0, 1.0);
igt_paint_color(cr, 0, h / 2, w / 2, h / 2, 1.0, 0.0, 0.0);
igt_paint_color(cr, w / 2, h / 2, w / 2, h / 2, 0.0, 0.0, 1.0);
} else {
- if (data->rotation == IGT_ROTATION_90 ||
- data->rotation == IGT_ROTATION_270)
- w = h = mode->vdisplay;
/* Paint with 4 squares of Red, Green, White, Blue Clockwise */
igt_paint_color(cr, 0, 0, w / 2, h / 2, 1.0, 0.0, 0.0);
igt_paint_color(cr, w / 2, 0, w / 2, h / 2, 0.0, 1.0, 0.0);