diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-06-19 19:09:16 +0100 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2017-09-27 12:48:16 +0800 |
commit | 1b04587eee33537fe862baf6fc6fc3937dccfdcc (patch) | |
tree | 16d3d7e0efec7648b725032148b1db813ef7f5e0 /va/x11 | |
parent | b0e7feda096d7ae8146ba2e0c22b7bd59b768950 (diff) | |
download | libva-1b04587eee33537fe862baf6fc6fc3937dccfdcc.tar.gz |
Move VADisplay allocation to common code
This is slightly cleaner, and will be required to set common
options on a newly-created display.
Signed-off-by: Mark Thompson <sw@jkqxz.net>
Diffstat (limited to 'va/x11')
-rw-r--r-- | va/x11/va_x11.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/va/x11/va_x11.c b/va/x11/va_x11.c index ab53b9b..b5fe6e9 100644 --- a/va/x11/va_x11.c +++ b/va/x11/va_x11.c @@ -26,6 +26,7 @@ #include "sysdeps.h" #include "va.h" #include "va_backend.h" +#include "va_internal.h" #include "va_trace.h" #include "va_fool.h" #include "va_x11.h" @@ -163,13 +164,11 @@ VADisplay vaGetDisplay ( /* create new entry */ VADriverContextP pDriverContext; struct dri_state *dri_state; - pDisplayContext = calloc(1, sizeof(*pDisplayContext)); + pDisplayContext = va_newDisplayContext(); pDriverContext = calloc(1, sizeof(*pDriverContext)); dri_state = calloc(1, sizeof(*dri_state)); if (pDisplayContext && pDriverContext && dri_state) { - pDisplayContext->vadpy_magic = VA_DISPLAY_MAGIC; - pDriverContext->native_dpy = (void *)native_dpy; pDriverContext->x11_screen = XDefaultScreen(native_dpy); pDriverContext->display_type = VA_DISPLAY_X11; |