summaryrefslogtreecommitdiff
path: root/va/x11
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2017-06-19 19:09:16 +0100
committerXiang, Haihao <haihao.xiang@intel.com>2017-09-27 12:48:16 +0800
commit1b04587eee33537fe862baf6fc6fc3937dccfdcc (patch)
tree16d3d7e0efec7648b725032148b1db813ef7f5e0 /va/x11
parentb0e7feda096d7ae8146ba2e0c22b7bd59b768950 (diff)
downloadlibva-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.c5
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;