Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libva
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
libva
Commits
acf42fc1
Commit
acf42fc1
authored
Mar 31, 2010
by
Austin Yuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display *x11_dpy ==> void *native_dpy for other window system
Signed-off-by:
Austin Yuan
<
shengquan.yuan@gmail.com
>
parent
c259a979
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
24 deletions
+24
-24
va/va_backend.h
va/va_backend.h
+1
-1
va/x11/dri1_util.c
va/x11/dri1_util.c
+9
-9
va/x11/dri2_util.c
va/x11/dri2_util.c
+10
-10
va/x11/va_x11.c
va/x11/va_x11.c
+4
-4
No files found.
va/va_backend.h
View file @
acf42fc1
...
...
@@ -382,7 +382,7 @@ struct VADriverContext
void
*
pDriverData
;
struct
VADriverVTable
vtable
;
Display
*
x11
_dpy
;
void
*
native
_dpy
;
int
x11_screen
;
int
version_major
;
int
version_minor
;
...
...
va/x11/dri1_util.c
View file @
acf42fc1
...
...
@@ -62,12 +62,12 @@ dri1Close(VADriverContextP ctx)
struct
dri_state
*
dri_state
=
(
struct
dri_state
*
)
ctx
->
dri_state
;
free_drawable_hashtable
(
ctx
);
VA_DRIDestroyContext
(
ctx
->
x11
_dpy
,
ctx
->
x11_screen
,
dri_state
->
hwContextID
);
VA_DRIDestroyContext
(
(
Display
*
)
ctx
->
native
_dpy
,
ctx
->
x11_screen
,
dri_state
->
hwContextID
);
assert
(
dri_state
->
pSAREA
!=
MAP_FAILED
);
drmUnmap
(
dri_state
->
pSAREA
,
SAREA_MAX
);
assert
(
dri_state
->
fd
>=
0
);
drmCloseOnce
(
dri_state
->
fd
);
VA_DRICloseConnection
(
ctx
->
x11
_dpy
,
ctx
->
x11_screen
);
VA_DRICloseConnection
(
(
Display
*
)
ctx
->
native
_dpy
,
ctx
->
x11_screen
);
}
Bool
...
...
@@ -87,7 +87,7 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name)
dri_state
->
pSAREA
=
MAP_FAILED
;
dri_state
->
driConnectedFlag
=
VA_NONE
;
if
(
!
VA_DRIQueryDirectRenderingCapable
(
ctx
->
x11
_dpy
,
if
(
!
VA_DRIQueryDirectRenderingCapable
(
(
Display
*
)
ctx
->
native
_dpy
,
ctx
->
x11_screen
,
&
direct_capable
))
goto
err_out0
;
...
...
@@ -95,12 +95,12 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name)
if
(
!
direct_capable
)
goto
err_out0
;
if
(
!
VA_DRIGetClientDriverName
(
ctx
->
x11
_dpy
,
ctx
->
x11_screen
,
if
(
!
VA_DRIGetClientDriverName
(
(
Display
*
)
ctx
->
native
_dpy
,
ctx
->
x11_screen
,
&
driver_major
,
&
driver_minor
,
&
driver_patch
,
driver_name
))
goto
err_out0
;
if
(
!
VA_DRIOpenConnection
(
ctx
->
x11
_dpy
,
ctx
->
x11_screen
,
if
(
!
VA_DRIOpenConnection
(
(
Display
*
)
ctx
->
native
_dpy
,
ctx
->
x11_screen
,
&
dri_state
->
hSAREA
,
&
BusID
))
goto
err_out0
;
...
...
@@ -115,14 +115,14 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name)
if
(
drmGetMagic
(
dri_state
->
fd
,
&
magic
))
goto
err_out1
;
if
(
newlyopened
&&
!
VA_DRIAuthConnection
(
ctx
->
x11
_dpy
,
ctx
->
x11_screen
,
magic
))
if
(
newlyopened
&&
!
VA_DRIAuthConnection
(
(
Display
*
)
ctx
->
native
_dpy
,
ctx
->
x11_screen
,
magic
))
goto
err_out1
;
if
(
drmMap
(
dri_state
->
fd
,
dri_state
->
hSAREA
,
SAREA_MAX
,
&
dri_state
->
pSAREA
))
goto
err_out1
;
if
(
!
VA_DRICreateContext
(
ctx
->
x11
_dpy
,
ctx
->
x11_screen
,
DefaultVisual
(
ctx
->
x11
_dpy
,
ctx
->
x11_screen
),
if
(
!
VA_DRICreateContext
(
(
Display
*
)
ctx
->
native
_dpy
,
ctx
->
x11_screen
,
DefaultVisual
(
(
Display
*
)
ctx
->
native
_dpy
,
ctx
->
x11_screen
),
&
dri_state
->
hwContextID
,
&
dri_state
->
hwContext
))
goto
err_out1
;
...
...
@@ -142,7 +142,7 @@ err_out1:
if
(
dri_state
->
fd
>=
0
)
drmCloseOnce
(
dri_state
->
fd
);
VA_DRICloseConnection
(
ctx
->
x11
_dpy
,
ctx
->
x11_screen
);
VA_DRICloseConnection
(
(
Display
*
)
ctx
->
native
_dpy
,
ctx
->
x11_screen
);
err_out0:
if
(
*
driver_name
)
...
...
va/x11/dri2_util.c
View file @
acf42fc1
...
...
@@ -48,7 +48,7 @@ dri2CreateDrawable(VADriverContextP ctx, XID x_drawable)
dri2_drawable
->
base
.
x_drawable
=
x_drawable
;
dri2_drawable
->
base
.
x
=
0
;
dri2_drawable
->
base
.
y
=
0
;
VA_DRI2CreateDrawable
(
ctx
->
x11
_dpy
,
x_drawable
);
VA_DRI2CreateDrawable
(
(
Display
*
)
ctx
->
native
_dpy
,
x_drawable
);
return
&
dri2_drawable
->
base
;
}
...
...
@@ -56,7 +56,7 @@ dri2CreateDrawable(VADriverContextP ctx, XID x_drawable)
static
void
dri2DestroyDrawable
(
VADriverContextP
ctx
,
struct
dri_drawable
*
dri_drawable
)
{
VA_DRI2DestroyDrawable
(
ctx
->
x11
_dpy
,
dri_drawable
->
x_drawable
);
VA_DRI2DestroyDrawable
(
(
Display
*
)
ctx
->
native
_dpy
,
dri_drawable
->
x_drawable
);
free
(
dri_drawable
);
}
...
...
@@ -73,10 +73,10 @@ dri2SwapBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable)
xrect
.
width
=
dri2_drawable
->
width
;
xrect
.
height
=
dri2_drawable
->
height
;
region
=
XFixesCreateRegion
(
ctx
->
x11
_dpy
,
&
xrect
,
1
);
VA_DRI2CopyRegion
(
ctx
->
x11
_dpy
,
dri_drawable
->
x_drawable
,
region
,
region
=
XFixesCreateRegion
(
(
Display
*
)
ctx
->
native
_dpy
,
&
xrect
,
1
);
VA_DRI2CopyRegion
(
(
Display
*
)
ctx
->
native
_dpy
,
dri_drawable
->
x_drawable
,
region
,
DRI2BufferFrontLeft
,
DRI2BufferBackLeft
);
XFixesDestroyRegion
(
ctx
->
x11
_dpy
,
region
);
XFixesDestroyRegion
(
(
Display
*
)
ctx
->
native
_dpy
,
region
);
}
}
...
...
@@ -92,7 +92,7 @@ dri2GetRenderingBuffer(VADriverContextP ctx, struct dri_drawable *dri_drawable)
i
=
0
;
attachments
[
i
++
]
=
__DRI_BUFFER_BACK_LEFT
;
attachments
[
i
++
]
=
__DRI_BUFFER_FRONT_LEFT
;
buffers
=
VA_DRI2GetBuffers
(
ctx
->
x11
_dpy
,
dri_drawable
->
x_drawable
,
buffers
=
VA_DRI2GetBuffers
(
(
Display
*
)
ctx
->
native
_dpy
,
dri_drawable
->
x_drawable
,
&
dri2_drawable
->
width
,
&
dri2_drawable
->
height
,
attachments
,
i
,
&
count
);
assert
(
buffers
);
...
...
@@ -149,14 +149,14 @@ isDRI2Connected(VADriverContextP ctx, char **driver_name)
*
driver_name
=
NULL
;
dri_state
->
fd
=
-
1
;
dri_state
->
driConnectedFlag
=
VA_NONE
;
if
(
!
VA_DRI2QueryExtension
(
ctx
->
x11
_dpy
,
&
event_base
,
&
error_base
))
if
(
!
VA_DRI2QueryExtension
(
(
Display
*
)
ctx
->
native
_dpy
,
&
event_base
,
&
error_base
))
goto
err_out
;
if
(
!
VA_DRI2QueryVersion
(
ctx
->
x11
_dpy
,
&
major
,
&
minor
))
if
(
!
VA_DRI2QueryVersion
(
(
Display
*
)
ctx
->
native
_dpy
,
&
major
,
&
minor
))
goto
err_out
;
if
(
!
VA_DRI2Connect
(
ctx
->
x11_dpy
,
RootWindow
(
ctx
->
x11
_dpy
,
ctx
->
x11_screen
),
if
(
!
VA_DRI2Connect
(
(
Display
*
)
ctx
->
native_dpy
,
RootWindow
((
Display
*
)
ctx
->
native
_dpy
,
ctx
->
x11_screen
),
driver_name
,
&
device_name
))
goto
err_out
;
...
...
@@ -169,7 +169,7 @@ isDRI2Connected(VADriverContextP ctx, char **driver_name)
if
(
drmGetMagic
(
dri_state
->
fd
,
&
magic
))
goto
err_out
;
if
(
!
VA_DRI2Authenticate
(
ctx
->
x11_dpy
,
RootWindow
(
ctx
->
x11
_dpy
,
ctx
->
x11_screen
),
if
(
!
VA_DRI2Authenticate
(
(
Display
*
)
ctx
->
native_dpy
,
RootWindow
((
Display
*
)
ctx
->
native
_dpy
,
ctx
->
x11_screen
),
magic
))
goto
err_out
;
...
...
va/x11/va_x11.c
View file @
acf42fc1
...
...
@@ -116,12 +116,12 @@ static VAStatus va_NVCTRL_GetDriverName (
int
direct_capable
,
driver_major
,
driver_minor
,
driver_patch
;
Bool
result
;
result
=
VA_NVCTRLQueryDirectRenderingCapable
(
ctx
->
x11
_dpy
,
ctx
->
x11_screen
,
result
=
VA_NVCTRLQueryDirectRenderingCapable
(
(
Display
*
)
ctx
->
native
_dpy
,
ctx
->
x11_screen
,
&
direct_capable
);
if
(
!
result
||
!
direct_capable
)
return
VA_STATUS_ERROR_UNKNOWN
;
result
=
VA_NVCTRLGetClientDriverName
(
ctx
->
x11
_dpy
,
ctx
->
x11_screen
,
result
=
VA_NVCTRLGetClientDriverName
(
(
Display
*
)
ctx
->
native
_dpy
,
ctx
->
x11_screen
,
&
driver_major
,
&
driver_minor
,
&
driver_patch
,
driver_name
);
if
(
!
result
)
...
...
@@ -172,7 +172,7 @@ VADisplay vaGetDisplay (
while
(
pDisplayContext
)
{
if
(
pDisplayContext
->
pDriverContext
&&
pDisplayContext
->
pDriverContext
->
x11_dpy
==
native_dpy
)
pDisplayContext
->
pDriverContext
->
native_dpy
==
(
void
*
)
native_dpy
)
{
dpy
=
(
VADisplay
)
pDisplayContext
;
break
;
...
...
@@ -192,7 +192,7 @@ VADisplay vaGetDisplay (
{
pDisplayContext
->
vadpy_magic
=
VA_DISPLAY_MAGIC
;
pDriverContext
->
x11_dpy
=
native_dpy
;
pDriverContext
->
native_dpy
=
(
void
*
)
native_dpy
;
pDisplayContext
->
pNext
=
pDisplayContexts
;
pDisplayContext
->
pDriverContext
=
pDriverContext
;
pDisplayContext
->
vaIsValid
=
va_DisplayContextIsValid
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment