Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
weston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
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
Stefan Agner
weston
Commits
111d3d8f
Commit
111d3d8f
authored
Oct 17, 2017
by
Michael Teyfel
Committed by
Daniel Stone
Feb 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simple-egl: remove ivi-application support
Signed-off-by:
Michael Teyfel
<
mteyfel@de.adit-jv.com
>
parent
e894b3e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
77 deletions
+13
-77
Makefile.am
Makefile.am
+1
-3
clients/simple-egl.c
clients/simple-egl.c
+12
-74
No files found.
Makefile.am
View file @
111d3d8f
...
...
@@ -648,9 +648,7 @@ demo_clients += weston-simple-egl
weston_simple_egl_SOURCES
=
clients/simple-egl.c
nodist_weston_simple_egl_SOURCES
=
\
protocol/xdg-shell-unstable-v6-protocol.c
\
protocol/xdg-shell-unstable-v6-client-protocol.h
\
protocol/ivi-application-protocol.c
\
protocol/ivi-application-client-protocol.h
protocol/xdg-shell-unstable-v6-client-protocol.h
weston_simple_egl_CFLAGS
=
$(AM_CFLAGS)
$(SIMPLE_EGL_CLIENT_CFLAGS)
weston_simple_egl_LDADD
=
$(SIMPLE_EGL_CLIENT_LIBS)
-lm
endif
...
...
clients/simple-egl.c
View file @
111d3d8f
...
...
@@ -45,8 +45,6 @@
#include "xdg-shell-unstable-v6-client-protocol.h"
#include <sys/types.h>
#include <unistd.h>
#include "ivi-application-client-protocol.h"
#define IVI_SURFACE_ID 9000
#include "shared/helpers.h"
#include "shared/platform.h"
...
...
@@ -74,7 +72,6 @@ struct display {
EGLConfig
conf
;
}
egl
;
struct
window
*
window
;
struct
ivi_application
*
ivi_application
;
PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC
swap_buffers_with_damage
;
};
...
...
@@ -97,7 +94,6 @@ struct window {
struct
wl_surface
*
surface
;
struct
zxdg_surface_v6
*
xdg_surface
;
struct
zxdg_toplevel_v6
*
xdg_toplevel
;
struct
ivi_surface
*
ivi_surface
;
EGLSurface
egl_surface
;
struct
wl_callback
*
callback
;
int
fullscreen
,
maximized
,
opaque
,
buffer_size
,
frame_sync
,
delay
;
...
...
@@ -359,27 +355,22 @@ static const struct zxdg_toplevel_v6_listener xdg_toplevel_listener = {
};
static
void
handle_ivi_surface_configure
(
void
*
data
,
struct
ivi_surface
*
ivi_surface
,
int32_t
width
,
int32_t
height
)
create_surface
(
struct
window
*
window
)
{
struct
window
*
window
=
data
;
wl_egl_window_resize
(
window
->
native
,
width
,
height
,
0
,
0
);
window
->
geometry
.
width
=
width
;
window
->
geometry
.
height
=
height
;
struct
display
*
display
=
window
->
display
;
EGLBoolean
ret
;
if
(
!
window
->
fullscreen
)
window
->
window_size
=
window
->
geometry
;
}
window
->
surface
=
wl_compositor_create_surface
(
display
->
compositor
);
static
const
struct
ivi_surface_listener
ivi_surface_listener
=
{
handle_ivi_surface_configure
,
};
window
->
native
=
wl_egl_window_create
(
window
->
surface
,
window
->
geometry
.
width
,
window
->
geometry
.
height
);
window
->
egl_surface
=
weston_platform_create_egl_surface
(
display
->
egl
.
dpy
,
display
->
egl
.
conf
,
window
->
native
,
NULL
);
static
void
create_xdg_surface
(
struct
window
*
window
,
struct
display
*
display
)
{
window
->
xdg_surface
=
zxdg_shell_v6_get_xdg_surface
(
display
->
shell
,
window
->
surface
);
zxdg_surface_v6_add_listener
(
window
->
xdg_surface
,
...
...
@@ -394,50 +385,6 @@ create_xdg_surface(struct window *window, struct display *display)
window
->
wait_for_configure
=
true
;
wl_surface_commit
(
window
->
surface
);
}
static
void
create_ivi_surface
(
struct
window
*
window
,
struct
display
*
display
)
{
uint32_t
id_ivisurf
=
IVI_SURFACE_ID
+
(
uint32_t
)
getpid
();
window
->
ivi_surface
=
ivi_application_surface_create
(
display
->
ivi_application
,
id_ivisurf
,
window
->
surface
);
if
(
window
->
ivi_surface
==
NULL
)
{
fprintf
(
stderr
,
"Failed to create ivi_client_surface
\n
"
);
abort
();
}
ivi_surface_add_listener
(
window
->
ivi_surface
,
&
ivi_surface_listener
,
window
);
}
static
void
create_surface
(
struct
window
*
window
)
{
struct
display
*
display
=
window
->
display
;
EGLBoolean
ret
;
window
->
surface
=
wl_compositor_create_surface
(
display
->
compositor
);
window
->
native
=
wl_egl_window_create
(
window
->
surface
,
window
->
geometry
.
width
,
window
->
geometry
.
height
);
window
->
egl_surface
=
weston_platform_create_egl_surface
(
display
->
egl
.
dpy
,
display
->
egl
.
conf
,
window
->
native
,
NULL
);
if
(
display
->
shell
)
{
create_xdg_surface
(
window
,
display
);
}
else
if
(
display
->
ivi_application
)
{
create_ivi_surface
(
window
,
display
);
}
else
{
assert
(
0
);
}
ret
=
eglMakeCurrent
(
window
->
display
->
egl
.
dpy
,
window
->
egl_surface
,
window
->
egl_surface
,
window
->
display
->
egl
.
ctx
);
...
...
@@ -469,8 +416,6 @@ destroy_surface(struct window *window)
zxdg_toplevel_v6_destroy
(
window
->
xdg_toplevel
);
if
(
window
->
xdg_surface
)
zxdg_surface_v6_destroy
(
window
->
xdg_surface
);
if
(
window
->
display
->
ivi_application
)
ivi_surface_destroy
(
window
->
ivi_surface
);
wl_surface_destroy
(
window
->
surface
);
if
(
window
->
callback
)
...
...
@@ -825,10 +770,6 @@ registry_handle_global(void *data, struct wl_registry *registry,
fprintf
(
stderr
,
"unable to load default left pointer
\n
"
);
// TODO: abort ?
}
}
else
if
(
strcmp
(
interface
,
"ivi_application"
)
==
0
)
{
d
->
ivi_application
=
wl_registry_bind
(
registry
,
name
,
&
ivi_application_interface
,
1
);
}
}
...
...
@@ -943,9 +884,6 @@ main(int argc, char **argv)
if
(
display
.
shell
)
zxdg_shell_v6_destroy
(
display
.
shell
);
if
(
display
.
ivi_application
)
ivi_application_destroy
(
display
.
ivi_application
);
if
(
display
.
compositor
)
wl_compositor_destroy
(
display
.
compositor
);
...
...
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