profile/ivi/wayland-ivi-extension.git
9 years agodownstream: ivi-controller: add argument 'pid' and 'title' to surface event
Janos Kovacs [Sun, 24 Aug 2014 18:27:36 +0000 (21:27 +0300)]
downstream: ivi-controller: add argument 'pid' and 'title' to surface event

Change-Id: I3400c102f69f2974f483170ca982f21f7c7bd11e
Signed-off-by: Janos Kovacs <jankovac503@gmail.com>
9 years agodownstream: synching ivi-application.xml to the counterpart in weston-ivi-shell
Janos Kovacs [Thu, 27 Nov 2014 16:28:15 +0000 (18:28 +0200)]
downstream: synching ivi-application.xml to the counterpart in weston-ivi-shell

Change-Id: I8500d6697bcc85a2e08cd491daf7cde5c2be80b1

9 years agoAdd new protocol to receive pid and title when an wl_shell application create wl_shel...
Nobuhiko Tanibata [Thu, 21 Aug 2014 06:55:13 +0000 (15:55 +0900)]
Add new protocol to receive pid and title when an wl_shell application create wl_shell surface.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
9 years agodownstream: IVISurfaceCreator: fix a wrong surface_id was set
Nobuhiko Tanibata [Tue, 18 Feb 2014 08:09:03 +0000 (17:09 +0900)]
downstream: IVISurfaceCreator: fix a wrong surface_id was set

Change-Id: I1c54f8bcd5988b741615c7d330bb2a66270fbe57
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agodownstream: IVISurfaceCreator: IVISurfaceCreator uses ivi_controller protocol.
Nobuhiko Tanibata [Mon, 17 Feb 2014 05:20:20 +0000 (14:20 +0900)]
downstream: IVISurfaceCreator: IVISurfaceCreator uses ivi_controller protocol.

Change-Id: Ia4ecf648d4e422c6f8c3401b5b749d3efc789c3d
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agodownstream: weston-ivi-shell: implementation to get_native handle
Nobuhiko Tanibata [Mon, 17 Feb 2014 05:11:00 +0000 (14:11 +0900)]
downstream: weston-ivi-shell: implementation to get_native handle

Change-Id: I5bfac45e47c811d23e9ef7876cc55322703bf744
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agodownstream: protocol: added get_native_handle to ivi_controller
Nobuhiko Tanibata [Mon, 17 Feb 2014 05:01:59 +0000 (14:01 +0900)]
downstream: protocol: added get_native_handle to ivi_controller

Change-Id: If1fe96a2bf4b4f66a4fc90b89154ff54676fb67b
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agodownstream: add missing end tag to set_keyboard_focus request
Janos Kovacs [Thu, 27 Nov 2014 15:53:22 +0000 (17:53 +0200)]
downstream: add missing end tag to set_keyboard_focus request

Change-Id: I5b23c444c366e912d5ca381e22b7761aa171acf3

9 years agotest: Add multi-surface focus test upstream 0.2.4 0.2.5
Jonathan Maw [Wed, 29 Oct 2014 11:55:14 +0000 (11:55 +0000)]
test: Add multi-surface focus test

This test works in isolation, but due to incomplete teardown
between tests, it does not work when run alongside other tests.

9 years agoLayerManagerControl: Make surface printing recognize multi-surface focus
Jonathan Maw [Tue, 28 Oct 2014 16:18:10 +0000 (16:18 +0000)]
LayerManagerControl: Make surface printing recognize multi-surface focus

9 years agoilmControl, LayerManagerControl: Add ilm_GetKeyboardMultiFocusSurfaceIds and make...
Jonathan Maw [Tue, 28 Oct 2014 15:41:20 +0000 (15:41 +0000)]
ilmControl, LayerManagerControl: Add ilm_GetKeyboardMultiFocusSurfaceIds and make LayerManagerControl use it

The function ilm_GetKeyboardFocusSurfaceId is retained for backwards
compatibility.

9 years agoLayerManagerControl: Add 'set keyboard focus' command
Jonathan Maw [Tue, 28 Oct 2014 14:04:03 +0000 (14:04 +0000)]
LayerManagerControl: Add 'set keyboard focus' command

The full command is "LayerManagerControl set keyboard focus <idarray>"
The old command, "LayerManagerControl set <surfaceid> keyboard focus"
has been preserved for backwards compatibility

9 years agoivi-controller, ilmControl: Add ilm_SetKeyboardMultiFocus
Jonathan Maw [Tue, 28 Oct 2014 12:20:52 +0000 (12:20 +0000)]
ivi-controller, ilmControl: Add ilm_SetKeyboardMultiFocus

This adds the function
ilm_SetKeyboardMultiFocus(t_ilm_surface *pSurfaceIds, t_ilm_int number)

which takes an array (and a size) of the surface IDs that should
be focussed.
The old ilm_SetKeyboardFocusOn() has been preserved for the sake of
backwards compatibility.

9 years agoivi-controller: Make keyboard focus getters/setters support multiple surfaces
Jonathan Maw [Mon, 27 Oct 2014 14:56:01 +0000 (14:56 +0000)]
ivi-controller: Make keyboard focus getters/setters support multiple surfaces

9 years agoivi-layermanagement-examples: EGLWLInputEventExapmle to be built with non-default...
Nobuhiko Tanibata [Thu, 30 Oct 2014 05:21:53 +0000 (14:21 +0900)]
ivi-layermanagement-examples: EGLWLInputEventExapmle to be built with non-default directly.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
9 years agoivi-layermnagement-examples: Add command-line option for surface to EGLWLInputEventEx...
Jonathan Maw [Wed, 6 Aug 2014 13:53:09 +0000 (13:53 +0000)]
ivi-layermnagement-examples: Add command-line option for surface to EGLWLInputEventExample

Signed-off-by: James Thomas <james.thomas@codethink.co.uk>
9 years agoivi-layermanagement-examples: Add EGLWLInputEventExample example application
James Thomas [Thu, 31 Jul 2014 08:55:55 +0000 (10:55 +0200)]
ivi-layermanagement-examples: Add EGLWLInputEventExample example application

Signed-off-by: James Thomas <james.thomas@codethink.co.uk>
9 years agotest: Fix keyboard focus test
Jonathan Maw [Thu, 14 Aug 2014 15:23:04 +0000 (15:23 +0000)]
test: Fix keyboard focus test

This fixes the test IlmCommandTest.ilm_keyboard_focus.

Signed-off-by: James Thomas <james.thomas@codethink.co.uk>
9 years agoweston-ivi-shell, ilmControl and ilmCommon: Implement GetKeyboardFocus
Jonathan Maw [Tue, 12 Aug 2014 10:50:00 +0000 (10:50 +0000)]
weston-ivi-shell, ilmControl and ilmCommon: Implement GetKeyboardFocus

This commit implements ilm_GetKeyboardFocusSurfaceId using the "input
focus" event from the "ivi controller surface" interface.

ilm_types.h has been expanded to store keyboard focus on a per-surface
basis.

Signed-off-by: James Thomas <james.thomas@codethink.co.uk>
9 years agoweston-ivi-shell and ilmControl: Implement 'set keyboard focus'
Jonathan Maw [Thu, 7 Aug 2014 16:47:44 +0000 (16:47 +0000)]
weston-ivi-shell and ilmControl: Implement 'set keyboard focus'

This commit implements ilm_SetKeyboardFocusOn by using the "ivi
controller surface" interface, implementing the specific case
of keyboard focus.

It expands ivi-layout.h and ivi-layout-export.h so that keyboard
focus can be stored on a per-surface basis.

Signed-off-by: James Thomas <james.thomas@codethink.co.uk>
9 years agoweston-ivi-shell: Update ivi-layout-export.h
Jonathan Maw [Mon, 20 Oct 2014 13:48:15 +0000 (13:48 +0000)]
weston-ivi-shell: Update ivi-layout-export.h

Signed-off-by: James Thomas <james.thomas@codethink.co.uk>
9 years agoivi-application.xml: apply the latest protocol from weston-ivi-shell
Nobuhiko Tanibata [Sat, 13 Sep 2014 02:03:30 +0000 (19:03 -0700)]
ivi-application.xml: apply the latest protocol from weston-ivi-shell

- Remove warning events. This is notified to ivi-controller by
  callback now.
- Add configure event to suggest resize of surface. When ivi-controller
  changes size of ivi_surface, client will receive this event.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoilm_Client: fix display connection leak.
Nobuhiko Tanibata [Thu, 11 Sep 2014 09:51:08 +0000 (18:51 +0900)]
ilm_Client: fix display connection leak.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoilmClient: Fix segv when a layer is added.
Nobuhiko Tanibata [Thu, 4 Sep 2014 13:47:15 +0000 (06:47 -0700)]
ilmClient: Fix segv when a layer is added.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agotests: check surfaceProperties.creatorPid too
Marcus Fritzsch [Tue, 19 Aug 2014 13:35:14 +0000 (15:35 +0200)]
tests: check surfaceProperties.creatorPid too

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: issue send_stats request on getPropertiesOfSurface
Marcus Fritzsch [Tue, 19 Aug 2014 12:31:04 +0000 (14:31 +0200)]
ilmControl: issue send_stats request on getPropertiesOfSurface

In order to have a current set of statistics in surface properties,
request submission of stats prior to retrieval of actual properties.

Also, if display_roundtrip_queue() fails in this one we assume something
is really broken and don't bother returning properties w/o stats but
simply error out.

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agotests: fixed 2 use-after-free errors
Marcus Fritzsch [Wed, 13 Aug 2014 08:57:23 +0000 (10:57 +0200)]
tests: fixed 2 use-after-free errors

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: check roundtrip results on init
Marcus Fritzsch [Tue, 5 Aug 2014 14:09:03 +0000 (16:09 +0200)]
ilmControl: check roundtrip results on init

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: stricter checking in display_roundtrip_queue()
Marcus Fritzsch [Tue, 12 Aug 2014 11:47:49 +0000 (13:47 +0200)]
ilmControl: stricter checking in display_roundtrip_queue()

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: check for valid wl_event_queue on init
Marcus Fritzsch [Tue, 5 Aug 2014 14:08:46 +0000 (16:08 +0200)]
ilmControl: check for valid wl_event_queue on init

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: rewrite sync_and_acquire_instance
Marcus Fritzsch [Tue, 5 Aug 2014 11:36:38 +0000 (13:36 +0200)]
ilmControl: rewrite sync_and_acquire_instance

* Moved all of the code to impl_sync_and_acquire_instance
* The macro still allows for ILM_FAILED return if instance is not
  correctly initialized or the wayland display connection broke.

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: move eventfd init to init_control()
Marcus Fritzsch [Tue, 5 Aug 2014 11:36:21 +0000 (13:36 +0200)]
ilmControl: move eventfd init to init_control()

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: destroy output objects, even w/o controller
Marcus Fritzsch [Wed, 20 Aug 2014 14:40:28 +0000 (16:40 +0200)]
ilmControl: destroy output objects, even w/o controller

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: shutdown_fd should be set to a default of -1
Marcus Fritzsch [Tue, 12 Aug 2014 11:40:04 +0000 (13:40 +0200)]
ilmControl: shutdown_fd should be set to a default of -1

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: check for valid controller on init
Marcus Fritzsch [Tue, 12 Aug 2014 11:28:02 +0000 (13:28 +0200)]
ilmControl: check for valid controller on init

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: allow clean shutdown on partial init
Marcus Fritzsch [Tue, 12 Aug 2014 11:27:47 +0000 (13:27 +0200)]
ilmControl: allow clean shutdown on partial init

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: use wl_output userdata pointer
Marcus Fritzsch [Tue, 12 Aug 2014 11:26:47 +0000 (13:26 +0200)]
ilmControl: use wl_output userdata pointer

And remove now unneeded get_screen_context_by_output()

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agotests: check roundtrip() result in Test ctor
Marcus Fritzsch [Tue, 5 Aug 2014 08:57:01 +0000 (10:57 +0200)]
tests: check roundtrip() result in Test ctor

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoivi-controller: Take surface screenshot even if surface is not on layer.
Nobuhiko Tanibata [Wed, 13 Aug 2014 08:36:33 +0000 (17:36 +0900)]
ivi-controller: Take surface screenshot even if surface is not on layer.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
9 years agoweston-ivi-shell: Add surface-screenshot function.
Nobuhiko Tanibata [Mon, 28 Jul 2014 09:02:51 +0000 (18:02 +0900)]
weston-ivi-shell: Add surface-screenshot function.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoweston-ivi-shell: Add function of save as bitmap.
Nobuhiko Tanibata [Mon, 28 Jul 2014 09:02:22 +0000 (18:02 +0900)]
weston-ivi-shell: Add function of save as bitmap.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agocmake: Add gl libraries.
Nobuhiko Tanibata [Mon, 28 Jul 2014 09:00:57 +0000 (18:00 +0900)]
cmake: Add gl libraries.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoweston-ivi-shell: Fix illegal surface free.
Nobuhiko Tanibata [Mon, 28 Jul 2014 09:00:19 +0000 (18:00 +0900)]
weston-ivi-shell: Fix illegal surface free.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoilmControl: when called from AddNotification, notify of surface creation.
Nobuhiko Tanibata [Mon, 4 Aug 2014 07:09:27 +0000 (16:09 +0900)]
ilmControl: when called from AddNotification, notify of surface creation.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoweston-ivi-shell: fix a memory leak of surface and resource.
Nobuhiko Tanibata [Mon, 4 Aug 2014 06:52:13 +0000 (15:52 +0900)]
weston-ivi-shell: fix a memory leak of surface and resource.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoilmControl: Return REMOVED immediatly when notification is set even if wl_surface...
Nobuhiko Tanibata [Tue, 29 Jul 2014 07:33:43 +0000 (16:33 +0900)]
ilmControl: Return REMOVED immediatly when notification is set even if wl_surface is not set to ivi_surface.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoilmControl: Send content event when ivi-surface is created or destroyed.
Nobuhiko Tanibata [Tue, 29 Jul 2014 07:28:33 +0000 (16:28 +0900)]
ilmControl: Send content event when ivi-surface is created or destroyed.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoilmCommon: Add flags of content state to ILM_NOTIFICATION.
Nobuhiko Tanibata [Mon, 7 Jul 2014 12:22:54 +0000 (21:22 +0900)]
ilmCommon: Add flags of content state to ILM_NOTIFICATION.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoilmControl: allow to set callback of surfaceAddNotification even if application doen...
Nobuhiko Tanibata [Sun, 10 Aug 2014 12:57:22 +0000 (21:57 +0900)]
ilmControl: allow to set callback of surfaceAddNotification even if application doen't map ID to wl_surface.

When application map ID to wl_surface by ivi_application.createSurface,
content_state is notified with content_available.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoweston-ivi-shell: allow to create ivi_controller_surface with ID even if application...
Nobuhiko Tanibata [Tue, 29 Jul 2014 05:30:58 +0000 (14:30 +0900)]
weston-ivi-shell: allow to create ivi_controller_surface with ID even if application doesn't map ID to wl_surface yet.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
9 years agoweston-ivi-shell: Send content_state event from ivi-controller.
Nobuhiko Tanibata [Mon, 7 Jul 2014 12:19:53 +0000 (21:19 +0900)]
weston-ivi-shell: Send content_state event from ivi-controller.

When content of ivi_surface is changes, e.g. map wl_surface or remove
it, content_state is notified.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoweston-ivi-shell: add calling ivi_layout_surfaceSetTransition to set transition type.
Nobuhiko Tanibata [Mon, 7 Jul 2014 17:54:13 +0000 (10:54 -0700)]
weston-ivi-shell: add calling ivi_layout_surfaceSetTransition to set transition type.

ivi-layout have new feture to control type of transion when property of
surface happens. ivi-layout proposes the above api:
ivi_layout_surfaceSetTransition to change the type.
This api allows user to set type of transition per surface when
commitchange happens. Type of transtion is defined in enum
ivi_layout_transition_type.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoweston-ivi-shell: Apply the latest headers of ivi-layout from upstream.
Nobuhiko Tanibata [Mon, 7 Jul 2014 17:52:53 +0000 (10:52 -0700)]
weston-ivi-shell: Apply the latest headers of ivi-layout from upstream.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoweston-ivi-shell: Move screenshot function from IVI-Shell to ivi-controller.
Nobuhiko Tanibata [Wed, 25 Jun 2014 08:55:08 +0000 (17:55 +0900)]
weston-ivi-shell: Move screenshot function from IVI-Shell to ivi-controller.

This is because ivi-shell shall not have dependency on other components
as much as possible. Now it depends on CAIRO.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoProtocol, ilmControl, add weston-ivi-shell: Add device type to argument of input_focu...
Nobuhiko Tanibata [Tue, 29 Jul 2014 05:01:05 +0000 (14:01 +0900)]
Protocol, ilmControl, add weston-ivi-shell: Add device type to argument of input_focus functions.

A parameter, device, is missing from protocol. It is needed for API spec.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoilmControl: Fix incorrect resource free.
Nobuhiko Tanibata [Fri, 8 Aug 2014 00:53:33 +0000 (09:53 +0900)]
ilmControl: Fix incorrect resource free.

Even if LayerManagerControl create a layer, it is destoryed when it
exits.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoivi-controller: Fix incorrect args for ivi_layout_layerSetRenderOrder.
Nobuhiko Tanibata [Fri, 8 Aug 2014 00:53:10 +0000 (09:53 +0900)]
ivi-controller: Fix incorrect args for ivi_layout_layerSetRenderOrder.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoivi-controller: Fix invalid read.
Nobuhiko Tanibata [Fri, 8 Aug 2014 00:52:42 +0000 (09:52 +0900)]
ivi-controller: Fix invalid read.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoivi-controller: Fix incorrect args for ivi_layout_screenSetRenderOrder.
Nobuhiko Tanibata [Fri, 8 Aug 2014 00:51:58 +0000 (09:51 +0900)]
ivi-controller: Fix incorrect args for ivi_layout_screenSetRenderOrder.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoivi-controller: Fix NULL deref in controller_screen_set_render_order
Nobuhiko Tanibata [Fri, 8 Aug 2014 00:47:57 +0000 (09:47 +0900)]
ivi-controller: Fix NULL deref in controller_screen_set_render_order
and invalid cast of pointer.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoivi-controller: Fix NULL deref.
Nobuhiko Tanibata [Fri, 8 Aug 2014 00:47:27 +0000 (09:47 +0900)]
ivi-controller: Fix NULL deref.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
9 years agoilmControl: removed TODO comments at ilm_*Notification impls
Marcus Fritzsch [Fri, 1 Aug 2014 11:17:05 +0000 (13:17 +0200)]
ilmControl: removed TODO comments at ilm_*Notification impls

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: correct argument to sizeof operator
Marcus Fritzsch [Fri, 1 Aug 2014 09:59:43 +0000 (11:59 +0200)]
ilmControl: correct argument to sizeof operator

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agotests: free resources in LayerSetRenderOrder_shrinking
Marcus Fritzsch [Fri, 1 Aug 2014 07:13:42 +0000 (09:13 +0200)]
tests: free resources in LayerSetRenderOrder_shrinking

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agotests: free resources in LayerSetRenderOrder_growing
Marcus Fritzsch [Fri, 1 Aug 2014 07:13:23 +0000 (09:13 +0200)]
tests: free resources in LayerSetRenderOrder_growing

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agotests: free resources in DisplaySetRenderOrder_shrinking
Marcus Fritzsch [Fri, 1 Aug 2014 07:13:03 +0000 (09:13 +0200)]
tests: free resources in DisplaySetRenderOrder_shrinking

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agotests: free resources in DisplaySetRenderOrder_growing
Marcus Fritzsch [Fri, 1 Aug 2014 07:12:42 +0000 (09:12 +0200)]
tests: free resources in DisplaySetRenderOrder_growing

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agotests: free resources in ilm_getPropertiesOfScreen
Marcus Fritzsch [Fri, 1 Aug 2014 07:12:19 +0000 (09:12 +0200)]
tests: free resources in ilm_getPropertiesOfScreen

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agotests: free resources in ilm_getNumberOfHardwareLayers
Marcus Fritzsch [Fri, 1 Aug 2014 07:11:39 +0000 (09:11 +0200)]
tests: free resources in ilm_getNumberOfHardwareLayers

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agotests: remove spurious newlines and an unused variable
Marcus Fritzsch [Fri, 1 Aug 2014 07:10:27 +0000 (09:10 +0200)]
tests: remove spurious newlines and an unused variable

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agotests: some simple free allocated arrays from ilm_* calls
Marcus Fritzsch [Fri, 1 Aug 2014 07:09:32 +0000 (09:09 +0200)]
tests: some simple free allocated arrays from ilm_* calls

ASSERT_* less and EXPECT_* more where we need to free resources.

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agotests: remove all cleanup code at end of tests
Marcus Fritzsch [Fri, 1 Aug 2014 07:02:21 +0000 (09:02 +0200)]
tests: remove all cleanup code at end of tests

These cleanup-marked lines where pretty bogus, as they wouldn't even be
executed if something ASSERT_'ed before it. Also, to have a clean slate,
the cleanup - i.e. remove all layers and surfaces - is done in TearDown.

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agonotifyTests: "allocate" 2-wide arrays in stack
Marcus Fritzsch [Fri, 1 Aug 2014 06:57:46 +0000 (08:57 +0200)]
notifyTests: "allocate" 2-wide arrays in stack

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: control_thread uses eventfd for shutdown signal
Marcus Fritzsch [Fri, 1 Aug 2014 06:55:27 +0000 (08:55 +0200)]
ilmControl: control_thread uses eventfd for shutdown signal

Do not use pthread_cancel to shutdown control_thread. This could cause
stale locks in libwayland-client when the cancel was received when
the display lock (according to the current 1.3 implementation) is held.

To alleviate this, one could disable thread_cancellation in
control_thread during wl_* calls, this however is one more hack to the
cancel-to-shutdown hack. Instead, use a clean interface to send an
event to the control_thread when it's time to shutdown.

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: remove implementation function pointer table
Marcus Fritzsch [Thu, 31 Jul 2014 11:05:42 +0000 (13:05 +0200)]
ilmControl: remove implementation function pointer table

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: sync_and_acquire_instance checks for initialization
Marcus Fritzsch [Wed, 30 Jul 2014 15:21:21 +0000 (17:21 +0200)]
ilmControl: sync_and_acquire_instance checks for initialization

sync_and_acquire_instance coded as a macro that checks
the initialized field and returns ILM_FAILED if no initilized.

As sync_and_acquire_instance() is only to be used from ilm_*
implementation functions, this should be safe.

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: control_thread variables are const
Marcus Fritzsch [Tue, 12 Aug 2014 08:41:54 +0000 (10:41 +0200)]
ilmControl: control_thread variables are const

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: simplify control_thread loop
Marcus Fritzsch [Tue, 12 Aug 2014 08:40:16 +0000 (10:40 +0200)]
ilmControl: simplify control_thread loop

Use an old-fashioned while loop for the prepare_read+
dispatch_pending loop.

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: destroy event queue if get_registry fails
Marcus Fritzsch [Wed, 30 Jul 2014 15:17:59 +0000 (17:17 +0200)]
ilmControl: destroy event queue if get_registry fails

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: free resources after use
Marcus Fritzsch [Wed, 30 Jul 2014 15:17:28 +0000 (17:17 +0200)]
ilmControl: free resources after use

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: a screen needs no order link
Marcus Fritzsch [Fri, 1 Aug 2014 09:25:32 +0000 (11:25 +0200)]
ilmControl: a screen needs no order link

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmClient: free resources after use
Marcus Fritzsch [Tue, 12 Aug 2014 07:37:57 +0000 (09:37 +0200)]
ilmClient: free resources after use

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmClient: init surface_context::link on create
Marcus Fritzsch [Tue, 12 Aug 2014 07:37:42 +0000 (09:37 +0200)]
ilmClient: init surface_context::link on create

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmClient: remove double-loop without purpose
Marcus Fritzsch [Wed, 30 Jul 2014 15:16:02 +0000 (17:16 +0200)]
ilmClient: remove double-loop without purpose

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: screen dimension is set only from current output mode
Marcus Fritzsch [Wed, 30 Jul 2014 10:16:31 +0000 (12:16 +0200)]
ilmControl: screen dimension is set only from current output mode

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: propagate roundtrip return value to caller of commitChanges
Marcus Fritzsch [Tue, 29 Jul 2014 15:19:01 +0000 (17:19 +0200)]
ilmControl: propagate roundtrip return value to caller of commitChanges

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: some initialization fixes
Marcus Fritzsch [Thu, 24 Jul 2014 11:12:58 +0000 (13:12 +0200)]
ilmControl: some initialization fixes

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: removed num_screen field of ilm_context
Marcus Fritzsch [Wed, 23 Jul 2014 11:06:49 +0000 (13:06 +0200)]
ilmControl: removed num_screen field of ilm_context

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: simplify SetRenderOrder implementations
Marcus Fritzsch [Wed, 23 Jul 2014 10:54:57 +0000 (12:54 +0200)]
ilmControl: simplify SetRenderOrder implementations

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: use three roundtrips at init time
Marcus Fritzsch [Wed, 23 Jul 2014 10:54:33 +0000 (12:54 +0200)]
ilmControl: use three roundtrips at init time

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: fix a minor memory leak
Marcus Fritzsch [Tue, 22 Jul 2014 11:52:06 +0000 (13:52 +0200)]
ilmControl: fix a minor memory leak

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: fix NULL deref in getPropertiesOfScreen
Marcus Fritzsch [Tue, 22 Jul 2014 11:51:49 +0000 (13:51 +0200)]
ilmControl: fix NULL deref in getPropertiesOfScreen

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: get rid of context::valid
Marcus Fritzsch [Tue, 29 Jul 2014 13:37:08 +0000 (15:37 +0200)]
ilmControl: get rid of context::valid

Replace valid with a needed "initialized" flag, also don't use
this flag to determine thread termination, pthread_cancel() is
used.

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: control_thread has most stuff in local variables
Marcus Fritzsch [Tue, 22 Jul 2014 09:12:06 +0000 (11:12 +0200)]
ilmControl: control_thread has most stuff in local variables

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: control_thread checks context validity more often
Marcus Fritzsch [Tue, 22 Jul 2014 09:08:00 +0000 (11:08 +0200)]
ilmControl: control_thread checks context validity more often

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: cancel read even on thread cancellation
Marcus Fritzsch [Tue, 22 Jul 2014 09:06:07 +0000 (11:06 +0200)]
ilmControl: cancel read even on thread cancellation

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: fix another "continued" error string
Marcus Fritzsch [Tue, 22 Jul 2014 09:03:09 +0000 (11:03 +0200)]
ilmControl: fix another "continued" error string

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmCommon: fix destruction order of "components"
Marcus Fritzsch [Tue, 22 Jul 2014 09:00:09 +0000 (11:00 +0200)]
ilmCommon: fix destruction order of "components"

After display ownership is managed in ilmCommon, it is important
to destroy components in the reverse order they were created.

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: renamed main_ctx field to just wl
Marcus Fritzsch [Mon, 21 Jul 2014 15:29:49 +0000 (17:29 +0200)]
ilmControl: renamed main_ctx field to just wl

Get rid of the "main_ctx" name as it does not apply anymore.

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
9 years agoilmControl: renamed get_instace, moved context locking inside it
Marcus Fritzsch [Mon, 21 Jul 2014 15:26:26 +0000 (17:26 +0200)]
ilmControl: renamed get_instace, moved context locking inside it

Renamed get_instance() to sync_and_acquire_instance() to cleanly state
that there is more than just return an instance pointer. Acquires the
state lock and does a display_roundtrip_queue()

Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>