summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* tests: some simple free allocated arrays from ilm_* callsMarcus Fritzsch2014-08-121-39/+78
| | | | | | ASSERT_* less and EXPECT_* more where we need to free resources. Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* tests: remove all cleanup code at end of testsMarcus Fritzsch2014-08-121-118/+0
| | | | | | | | 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>
* notifyTests: "allocate" 2-wide arrays in stackMarcus Fritzsch2014-08-121-6/+2
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: control_thread uses eventfd for shutdown signalMarcus Fritzsch2014-08-121-18/+38
| | | | | | | | | | | | | 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>
* ilmControl: remove implementation function pointer tableMarcus Fritzsch2014-08-123-801/+128
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: sync_and_acquire_instance checks for initializationMarcus Fritzsch2014-08-121-8/+10
| | | | | | | | | | 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>
* ilmControl: control_thread variables are constMarcus Fritzsch2014-08-121-6/+5
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: simplify control_thread loopMarcus Fritzsch2014-08-121-3/+1
| | | | | | | Use an old-fashioned while loop for the prepare_read+ dispatch_pending loop. Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: destroy event queue if get_registry failsMarcus Fritzsch2014-08-121-0/+2
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: free resources after useMarcus Fritzsch2014-08-121-12/+42
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: a screen needs no order linkMarcus Fritzsch2014-08-121-2/+0
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmClient: free resources after useMarcus Fritzsch2014-08-121-6/+34
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmClient: init surface_context::link on createMarcus Fritzsch2014-08-121-0/+2
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmClient: remove double-loop without purposeMarcus Fritzsch2014-08-121-6/+0
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: screen dimension is set only from current output modeMarcus Fritzsch2014-08-121-3/+7
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: propagate roundtrip return value to caller of commitChangesMarcus Fritzsch2014-08-121-2/+4
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: some initialization fixesMarcus Fritzsch2014-08-121-6/+2
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: removed num_screen field of ilm_contextMarcus Fritzsch2014-08-121-5/+0
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: simplify SetRenderOrder implementationsMarcus Fritzsch2014-08-121-34/+16
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: use three roundtrips at init timeMarcus Fritzsch2014-08-121-0/+4
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: fix a minor memory leakMarcus Fritzsch2014-08-121-0/+1
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: fix NULL deref in getPropertiesOfScreenMarcus Fritzsch2014-08-121-16/+13
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: get rid of context::validMarcus Fritzsch2014-08-121-19/+12
| | | | | | | | 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>
* ilmControl: control_thread has most stuff in local variablesMarcus Fritzsch2014-08-121-8/+11
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: control_thread checks context validity more oftenMarcus Fritzsch2014-08-121-3/+5
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: cancel read even on thread cancellationMarcus Fritzsch2014-08-121-1/+12
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: fix another "continued" error stringMarcus Fritzsch2014-08-121-2/+1
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmCommon: fix destruction order of "components"Marcus Fritzsch2014-08-121-3/+3
| | | | | | | 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>
* ilmControl: renamed main_ctx field to just wlMarcus Fritzsch2014-08-121-90/+90
| | | | | | Get rid of the "main_ctx" name as it does not apply anymore. Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: renamed get_instace, moved context locking inside itMarcus Fritzsch2014-08-121-147/+106
| | | | | | | | 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>
* ilmControl: added display_flush to layer "screenshot"Marcus Fritzsch2014-08-121-0/+1
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: remove last remains of dual-contextsMarcus Fritzsch2014-08-121-63/+5
| | | | | | | * child global listener renamed. * main global listener removed. Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: rename child globals listenerMarcus Fritzsch2014-08-121-29/+10
| | | | | | Also remove the "mostly-child" main globals listener. Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: removed main controller_surface listenerMarcus Fritzsch2014-08-121-172/+0
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: renamed child controller_surface listenerMarcus Fritzsch2014-08-121-27/+27
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: renamed all child controller_layer listenersMarcus Fritzsch2014-08-121-16/+16
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: remove child_ctxMarcus Fritzsch2014-08-121-18/+16
| | | | | | First step towards single "context", use main_ctx for everything. Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: acquire context lock on each ilm callMarcus Fritzsch2014-08-121-0/+99
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: implement new control_thread main loopMarcus Fritzsch2014-08-121-28/+57
| | | | | | | | | * Implements a dispatch loop pretty much like the wayland documentation suggests. * Acquire the context lock before each dispatching call. * Make sure to cancel_read even when the thread is cancelled. Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: rework init + destroy, wl_event_queueMarcus Fritzsch2014-08-121-63/+62
| | | | | | | | | | | | | | | * Using a private event queue for all ilm_* internal wayland communication. This separates the ivi_* objects from whatever is used externally. * Init not happens _only_ on ilm_init This also means no more is initialized polling and possibly exit(0)ing from get_instace() * Fixed destroy to happen in main thread where it will actually be executed. * Needed to adapt ilm_commitChanges() to new internal wl_event_queue. Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: Removed some unnecessary NULL checksMarcus Fritzsch2014-08-121-7/+3
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: Added display_roundtrip_queue()Marcus Fritzsch2014-08-121-0/+30
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* notifyTests: expect the correct number of callsMarcus Fritzsch2014-08-121-6/+6
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmCommon: manage ownership of display connectionMarcus Fritzsch2014-08-121-1/+12
| | | | | | | | Introduced a new flag 'disconnect_display' separate from valid, as adding bits to valid would change its scope and entail changes to all usages of it. Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: simplify add/remove ordersurface to/from layerMarcus Fritzsch2014-08-121-25/+8
| | | | | | | * simplify implementation. * only pass the data that we actually need. Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: make use of userdata pointer for ctrl surfacesMarcus Fritzsch2014-08-121-143/+28
| | | | | | * Use the userdata pointer in surface listener methods. Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: actually remove get_layer_context()Marcus Fritzsch2014-08-121-24/+0
| | | | Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: renaming the last remaining layer listenerMarcus Fritzsch2014-08-121-2/+2
| | | | | | | * No more child/main, only one remains and we do not need a suffix anymore. Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: code deduplication regarding controller listenersMarcus Fritzsch2014-08-121-65/+3
| | | | | | | * Actually use the same code for maina dnchild listeners, where possible. Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
* ilmControl: Minor fix to create_controller_layer()Marcus Fritzsch2014-08-121-6/+8
| | | | | | * Pulled the check for existing layer out of the function. Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>