summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2015-05-06 19:15:37 -0300
committerPaulo Zanoni <paulo.r.zanoni@intel.com>2015-05-14 10:02:07 -0300
commita976d7e44abb9d4e4540a8d072cdf55a7e0ea37b (patch)
treef95f31c20e46019c51c72aaae023f01219f8df86 /tests
parentfceed3a585cfcc5d2f412f11029a5a2ff3af3726 (diff)
tests/kms_fbc_crc: refactor context handling code
Just a small modification to make the code a little easier to understand, IMHO. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/kms_fbc_crc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/kms_fbc_crc.c b/tests/kms_fbc_crc.c
index 20510ff5..0f09a60a 100644
--- a/tests/kms_fbc_crc.c
+++ b/tests/kms_fbc_crc.c
@@ -227,6 +227,7 @@ static void test_crc(data_t *data, enum test_mode mode)
switch (mode) {
void *ptr;
+ drm_intel_context *context = NULL;
case TEST_PAGE_FLIP:
break;
case TEST_MMAP_CPU:
@@ -248,13 +249,12 @@ static void test_crc(data_t *data, enum test_mode mode)
case TEST_PAGE_FLIP_AND_BLT:
fill_blt(data, handle, data->fb, ~0);
break;
- case TEST_RENDER:
case TEST_CONTEXT:
- case TEST_PAGE_FLIP_AND_RENDER:
case TEST_PAGE_FLIP_AND_CONTEXT:
- fill_render(data, handle,
- (mode == TEST_CONTEXT || mode == TEST_PAGE_FLIP_AND_CONTEXT) ?
- data->ctx[1] : NULL, 0xff);
+ context = data->ctx[1];
+ case TEST_RENDER:
+ case TEST_PAGE_FLIP_AND_RENDER:
+ fill_render(data, handle, context, 0xff);
break;
}