Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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
vlc-2-2
Commits
2a1feab2
Commit
2a1feab2
authored
Nov 03, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EGL: add CheckClientExt() helper
Checks support for a EGL client extension.
parent
e1cdb462
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
+20
-12
modules/video_output/egl.c
modules/video_output/egl.c
+20
-12
No files found.
modules/video_output/egl.c
View file @
2a1feab2
...
...
@@ -79,27 +79,35 @@ static void ReleaseCurrent (vlc_gl_t *);
static
void
SwapBuffers
(
vlc_gl_t
*
);
static
void
*
GetSymbol
(
vlc_gl_t
*
,
const
char
*
);
static
bool
Check
API
(
EGLDisplay
dpy
,
const
char
*
api
)
static
bool
Check
Token
(
const
char
*
haystack
,
const
char
*
needle
)
{
const
char
*
apis
=
eglQueryString
(
dpy
,
EGL_CLIENT_APIS
);
size_t
apilen
=
strlen
(
api
);
size_t
len
=
strlen
(
needle
);
/* Cannot use strtok_r() on constant string... */
do
while
(
haystack
!=
NULL
)
{
while
(
*
apis
==
' '
)
apis
++
;
if
(
!
strncmp
(
apis
,
api
,
api
len
)
&&
(
memchr
(
" "
,
apis
[
api
len
],
2
)
!=
NULL
))
while
(
*
haystack
==
' '
)
haystack
++
;
if
(
!
strncmp
(
haystack
,
needle
,
len
)
&&
(
memchr
(
" "
,
haystack
[
len
],
2
)
!=
NULL
))
return
true
;
apis
=
strchr
(
apis
,
' '
);
haystack
=
strchr
(
haystack
,
' '
);
}
while
(
apis
!=
NULL
);
return
false
;
}
static
bool
CheckAPI
(
EGLDisplay
dpy
,
const
char
*
api
)
{
const
char
*
apis
=
eglQueryString
(
dpy
,
EGL_CLIENT_APIS
);
return
CheckToken
(
apis
,
api
);
}
static
bool
CheckClientExt
(
const
char
*
name
)
{
const
char
*
exts
=
eglQueryString
(
EGL_NO_DISPLAY
,
EGL_EXTENSIONS
);
return
CheckToken
(
exts
,
name
);
}
struct
gl_api
{
const
char
name
[
10
];
...
...
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