diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2014-02-05 15:32:15 +0000 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2014-02-11 13:50:16 +0000 |
commit | 969435a4078be5c1926c6ecbcfcbedfd6a9d8a64 (patch) | |
tree | f448bc090995625249f7792c39f716acd7d3934d /tests/kms_cursor_crc.c | |
parent | d39f5a059b688878f07586f7a9292299316424c2 (diff) |
tests/kms_cursor_crc: Move the array of cursor fb_ids to the stack
This array is not used outside ouf create_cursor_fb(). A stack allocated
array is enough.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'tests/kms_cursor_crc.c')
-rw-r--r-- | tests/kms_cursor_crc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c index 38aa1ab5..9ddee068 100644 --- a/tests/kms_cursor_crc.c +++ b/tests/kms_cursor_crc.c @@ -52,7 +52,6 @@ typedef struct { int drm_fd; igt_debugfs_t debugfs; drmModeRes *resources; - uint32_t fb_id[NUM_CURSOR_TYPES]; struct kmstest_fb fb[NUM_CURSOR_TYPES]; igt_pipe_crc_t **pipe_crc; } data_t; @@ -313,11 +312,12 @@ static void create_cursor_fb(data_t *data, double r, double g, double b, double a) { cairo_t *cr; + uint32_t fb_id[NUM_CURSOR_TYPES]; - data->fb_id[cursor_type] = kmstest_create_fb2(data->drm_fd, 64, 64, - DRM_FORMAT_ARGB8888, false, - &data->fb[cursor_type]); - igt_assert(data->fb_id[cursor_type]); + fb_id[cursor_type] = kmstest_create_fb2(data->drm_fd, 64, 64, + DRM_FORMAT_ARGB8888, false, + &data->fb[cursor_type]); + igt_assert(fb_id[cursor_type]); cr = kmstest_get_cairo_ctx(data->drm_fd, &data->fb[cursor_type]); |