• 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/common/libva


Commit MetaInfo

修订版acf42fc19c8025c5842314e89b5a103132827176 (tree)
时间2010-03-31 14:21:43
作者Austin Yuan <shengquan.yuan@gmai...>
CommiterAustin Yuan

Log Message

Display *x11_dpy ==> void *native_dpy for other window system

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

更改概述

差异

--- a/va/va_backend.h
+++ b/va/va_backend.h
@@ -382,7 +382,7 @@ struct VADriverContext
382382 void *pDriverData;
383383 struct VADriverVTable vtable;
384384
385- Display *x11_dpy;
385+ void *native_dpy;
386386 int x11_screen;
387387 int version_major;
388388 int version_minor;
--- a/va/x11/dri1_util.c
+++ b/va/x11/dri1_util.c
@@ -62,12 +62,12 @@ dri1Close(VADriverContextP ctx)
6262 struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
6363
6464 free_drawable_hashtable(ctx);
65- VA_DRIDestroyContext(ctx->x11_dpy, ctx->x11_screen, dri_state->hwContextID);
65+ VA_DRIDestroyContext((Display *)ctx->native_dpy, ctx->x11_screen, dri_state->hwContextID);
6666 assert(dri_state->pSAREA != MAP_FAILED);
6767 drmUnmap(dri_state->pSAREA, SAREA_MAX);
6868 assert(dri_state->fd >= 0);
6969 drmCloseOnce(dri_state->fd);
70- VA_DRICloseConnection(ctx->x11_dpy, ctx->x11_screen);
70+ VA_DRICloseConnection((Display *)ctx->native_dpy, ctx->x11_screen);
7171 }
7272
7373 Bool
@@ -87,7 +87,7 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name)
8787 dri_state->pSAREA = MAP_FAILED;
8888 dri_state->driConnectedFlag = VA_NONE;
8989
90- if (!VA_DRIQueryDirectRenderingCapable(ctx->x11_dpy,
90+ if (!VA_DRIQueryDirectRenderingCapable((Display *)ctx->native_dpy,
9191 ctx->x11_screen,
9292 &direct_capable))
9393 goto err_out0;
@@ -95,12 +95,12 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name)
9595 if (!direct_capable)
9696 goto err_out0;
9797
98- if (!VA_DRIGetClientDriverName(ctx->x11_dpy, ctx->x11_screen,
98+ if (!VA_DRIGetClientDriverName((Display *)ctx->native_dpy, ctx->x11_screen,
9999 &driver_major, &driver_minor,
100100 &driver_patch, driver_name))
101101 goto err_out0;
102102
103- if (!VA_DRIOpenConnection(ctx->x11_dpy, ctx->x11_screen,
103+ if (!VA_DRIOpenConnection((Display *)ctx->native_dpy, ctx->x11_screen,
104104 &dri_state->hSAREA, &BusID))
105105 goto err_out0;
106106
@@ -115,14 +115,14 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name)
115115 if (drmGetMagic(dri_state->fd, &magic))
116116 goto err_out1;
117117
118- if (newlyopened && !VA_DRIAuthConnection(ctx->x11_dpy, ctx->x11_screen, magic))
118+ if (newlyopened && !VA_DRIAuthConnection((Display *)ctx->native_dpy, ctx->x11_screen, magic))
119119 goto err_out1;
120120
121121 if (drmMap(dri_state->fd, dri_state->hSAREA, SAREA_MAX, &dri_state->pSAREA))
122122 goto err_out1;
123123
124- if (!VA_DRICreateContext(ctx->x11_dpy, ctx->x11_screen,
125- DefaultVisual(ctx->x11_dpy, ctx->x11_screen),
124+ if (!VA_DRICreateContext((Display *)ctx->native_dpy, ctx->x11_screen,
125+ DefaultVisual((Display *)ctx->native_dpy, ctx->x11_screen),
126126 &dri_state->hwContextID, &dri_state->hwContext))
127127 goto err_out1;
128128
@@ -142,7 +142,7 @@ err_out1:
142142 if (dri_state->fd >= 0)
143143 drmCloseOnce(dri_state->fd);
144144
145- VA_DRICloseConnection(ctx->x11_dpy, ctx->x11_screen);
145+ VA_DRICloseConnection((Display *)ctx->native_dpy, ctx->x11_screen);
146146
147147 err_out0:
148148 if (*driver_name)
--- a/va/x11/dri2_util.c
+++ b/va/x11/dri2_util.c
@@ -48,7 +48,7 @@ dri2CreateDrawable(VADriverContextP ctx, XID x_drawable)
4848 dri2_drawable->base.x_drawable = x_drawable;
4949 dri2_drawable->base.x = 0;
5050 dri2_drawable->base.y = 0;
51- VA_DRI2CreateDrawable(ctx->x11_dpy, x_drawable);
51+ VA_DRI2CreateDrawable((Display *)ctx->native_dpy, x_drawable);
5252
5353 return &dri2_drawable->base;
5454 }
@@ -56,7 +56,7 @@ dri2CreateDrawable(VADriverContextP ctx, XID x_drawable)
5656 static void
5757 dri2DestroyDrawable(VADriverContextP ctx, struct dri_drawable *dri_drawable)
5858 {
59- VA_DRI2DestroyDrawable(ctx->x11_dpy, dri_drawable->x_drawable);
59+ VA_DRI2DestroyDrawable((Display *)ctx->native_dpy, dri_drawable->x_drawable);
6060 free(dri_drawable);
6161 }
6262
@@ -73,10 +73,10 @@ dri2SwapBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable)
7373 xrect.width = dri2_drawable->width;
7474 xrect.height = dri2_drawable->height;
7575
76- region = XFixesCreateRegion(ctx->x11_dpy, &xrect, 1);
77- VA_DRI2CopyRegion(ctx->x11_dpy, dri_drawable->x_drawable, region,
76+ region = XFixesCreateRegion((Display *)ctx->native_dpy, &xrect, 1);
77+ VA_DRI2CopyRegion((Display *)ctx->native_dpy, dri_drawable->x_drawable, region,
7878 DRI2BufferFrontLeft, DRI2BufferBackLeft);
79- XFixesDestroyRegion(ctx->x11_dpy, region);
79+ XFixesDestroyRegion((Display *)ctx->native_dpy, region);
8080 }
8181 }
8282
@@ -92,7 +92,7 @@ dri2GetRenderingBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable)
9292 i = 0;
9393 attachments[i++] = __DRI_BUFFER_BACK_LEFT;
9494 attachments[i++] = __DRI_BUFFER_FRONT_LEFT;
95- buffers = VA_DRI2GetBuffers(ctx->x11_dpy, dri_drawable->x_drawable,
95+ buffers = VA_DRI2GetBuffers((Display *)ctx->native_dpy, dri_drawable->x_drawable,
9696 &dri2_drawable->width, &dri2_drawable->height,
9797 attachments, i, &count);
9898 assert(buffers);
@@ -149,14 +149,14 @@ isDRI2Connected(VADriverContextP ctx, char **driver_name)
149149 *driver_name = NULL;
150150 dri_state->fd = -1;
151151 dri_state->driConnectedFlag = VA_NONE;
152- if (!VA_DRI2QueryExtension(ctx->x11_dpy, &event_base, &error_base))
152+ if (!VA_DRI2QueryExtension((Display *)ctx->native_dpy, &event_base, &error_base))
153153 goto err_out;
154154
155- if (!VA_DRI2QueryVersion(ctx->x11_dpy, &major, &minor))
155+ if (!VA_DRI2QueryVersion((Display *)ctx->native_dpy, &major, &minor))
156156 goto err_out;
157157
158158
159- if (!VA_DRI2Connect(ctx->x11_dpy, RootWindow(ctx->x11_dpy, ctx->x11_screen),
159+ if (!VA_DRI2Connect((Display *)ctx->native_dpy, RootWindow((Display *)ctx->native_dpy, ctx->x11_screen),
160160 driver_name, &device_name))
161161 goto err_out;
162162
@@ -169,7 +169,7 @@ isDRI2Connected(VADriverContextP ctx, char **driver_name)
169169 if (drmGetMagic(dri_state->fd, &magic))
170170 goto err_out;
171171
172- if (!VA_DRI2Authenticate(ctx->x11_dpy, RootWindow(ctx->x11_dpy, ctx->x11_screen),
172+ if (!VA_DRI2Authenticate((Display *)ctx->native_dpy, RootWindow((Display *)ctx->native_dpy, ctx->x11_screen),
173173 magic))
174174 goto err_out;
175175
--- a/va/x11/va_x11.c
+++ b/va/x11/va_x11.c
@@ -116,12 +116,12 @@ static VAStatus va_NVCTRL_GetDriverName (
116116 int direct_capable, driver_major, driver_minor, driver_patch;
117117 Bool result;
118118
119- result = VA_NVCTRLQueryDirectRenderingCapable(ctx->x11_dpy, ctx->x11_screen,
119+ result = VA_NVCTRLQueryDirectRenderingCapable((Display *)ctx->native_dpy, ctx->x11_screen,
120120 &direct_capable);
121121 if (!result || !direct_capable)
122122 return VA_STATUS_ERROR_UNKNOWN;
123123
124- result = VA_NVCTRLGetClientDriverName(ctx->x11_dpy, ctx->x11_screen,
124+ result = VA_NVCTRLGetClientDriverName((Display *)ctx->native_dpy, ctx->x11_screen,
125125 &driver_major, &driver_minor,
126126 &driver_patch, driver_name);
127127 if (!result)
@@ -172,7 +172,7 @@ VADisplay vaGetDisplay (
172172 while (pDisplayContext)
173173 {
174174 if (pDisplayContext->pDriverContext &&
175- pDisplayContext->pDriverContext->x11_dpy == native_dpy)
175+ pDisplayContext->pDriverContext->native_dpy == (void *)native_dpy)
176176 {
177177 dpy = (VADisplay)pDisplayContext;
178178 break;
@@ -192,7 +192,7 @@ VADisplay vaGetDisplay (
192192 {
193193 pDisplayContext->vadpy_magic = VA_DISPLAY_MAGIC;
194194
195- pDriverContext->x11_dpy = native_dpy;
195+ pDriverContext->native_dpy = (void *)native_dpy;
196196 pDisplayContext->pNext = pDisplayContexts;
197197 pDisplayContext->pDriverContext = pDriverContext;
198198 pDisplayContext->vaIsValid = va_DisplayContextIsValid;