• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/libva


Commit MetaInfo

修订版91455761d2584f08dba4e893ef042ce41b33626c (tree)
时间2009-04-23 04:54:26
作者Austin Yuan <shengquan.yuan@inte...>
CommiterAustin Yuan

Log Message

More update for DRI2 support

Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>

更改概述

差异

--- a/configure.ac
+++ b/configure.ac
@@ -36,8 +36,6 @@ AC_SYS_LARGEFILE
3636
3737 PKG_CHECK_MODULES([X11], [x11])
3838 PKG_CHECK_MODULES([XEXT], [xext])
39-PKG_CHECK_MODULES([Xfixes], [xfixes])
40-PKG_CHECK_MODULES([XDAMAGE], [xdamage])
4139 PKG_CHECK_MODULES([DRM], [libdrm])
4240 PKG_CHECK_MODULES(LIBDRM_DEPS, [libdrm])
4341
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -27,7 +27,7 @@ INCLUDES = \
2727 libva_la_LTLIBRARIES = libva.la
2828 libva_ladir = $(libdir)
2929 libva_la_LDFLAGS = -version-number 0:30:0 -no-undefined
30-libva_la_LIBADD = $(LIBVA_LIBS) -ldl -lX11 -lXext -lXfixes -lXdamage -lXv -lXrandr X11/libva_X11.la
30+libva_la_LIBADD = $(LIBVA_LIBS) -ldl -ldrm -lX11 -lXext X11/libva_X11.la
3131
3232 SUBDIRS = X11
3333
--- a/src/X11/va_dri2.c
+++ b/src/X11/va_dri2.c
@@ -40,7 +40,8 @@
4040 #include "va_dri2.h"
4141
4242 static char va_dri2ExtensionName[] = DRI2_NAME;
43-static XExtensionInfo *va_dri2Info;
43+static XExtensionInfo _va_dri2_info_data;
44+static XExtensionInfo *va_dri2Info = &_va_dri2_info_data;
4445 static XEXT_GENERATE_CLOSE_DISPLAY (VA_DRI2CloseDisplay, va_dri2Info)
4546 static /* const */ XExtensionHooks va_dri2ExtensionHooks = {
4647 NULL, /* create_gc */
@@ -49,7 +50,7 @@ static /* const */ XExtensionHooks va_dri2ExtensionHooks = {
4950 NULL, /* free_gc */
5051 NULL, /* create_font */
5152 NULL, /* free_font */
52- VA_DRI2CloseDisplay, /* close_display */
53+ VA_DRI2CloseDisplay, /* close_display */
5354 NULL, /* wire_to_event */
5455 NULL, /* event_to_wire */
5556 NULL, /* error */
--- a/src/X11/va_x11.c
+++ b/src/X11/va_x11.c
@@ -27,9 +27,14 @@
2727 #include "va_backend.h"
2828 #include "va_x11.h"
2929 #include "va_dri.h"
30+#include "va_dri2.h"
3031 #include <stdio.h>
3132 #include <stdarg.h>
3233 #include <string.h>
34+#include <sys/types.h>
35+#include <sys/stat.h>
36+#include <fcntl.h>
37+#include <errno.h>
3338
3439 static VADisplayContextP pDisplayContexts = NULL;
3540
@@ -97,7 +102,8 @@ static VAStatus va_DRI2GetDriverName (
97102 {
98103 VADriverContextP ctx = pDisplayContext->pDriverContext;
99104 VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN;
100- char *driverName, *deviceName;
105+ int eventBase, errorBase;
106+ char *device_name;
101107 int driver_major;
102108 int driver_minor;
103109 int driver_patch;
@@ -114,7 +120,7 @@ static VAStatus va_DRI2GetDriverName (
114120 }
115121
116122 if (!VA_DRI2Connect(ctx->x11_dpy, RootWindow(ctx->x11_dpy, ctx->x11_screen),
117- &driver_name, &device_name)) {
123+ driver_name, &device_name)) {
118124 va_infoMessage("DRI2 isn't enabled, fallback to DRI1\n");
119125 return VA_STATUS_ERROR_UNKNOWN;
120126 }
@@ -214,7 +220,7 @@ static VAStatus va_DisplayContextGetDriverName (
214220 {
215221 /* For easier debugging */
216222 if (*driver_name)
217- Xfree(*driver_name);
223+ XFree(*driver_name);
218224
219225 *driver_name = strdup(getenv("LIBVA_DRIVER_NAME"));
220226 return VA_STATUS_SUCCESS;