We can just handle the tile invalidation messaged directly in
LOKitTileProvider where we just send a tile invalidation event to
LOKitThread. This is needed as we aren't in the correct thread.
Change-Id: I62995f2f9abfa7496e0793549b8e02ff47b1ed65
With ACTION_MULTIPLE more characters have been entered at the same
time. In this case we send more key press events to LO for now.
This is generally useful for IME input but Android also sends this
if non-ASCII key has been hit - even when the key is only one
character.
Change-Id: Iaf48ed4e40b8e4413ed5735add34870ec263b61d
Currently the tile reevaluation was done in UI thread which could
cause UI stutters as reevaluation is not a simple task. The
result was also a lot of tile rendering requests to LOKitThread.
This changes turns this around and the tile reevaluation is done
in LOKitThread instead. Now the UI thread just sends a LOEvent
when the reevaluation should be done. This should also reduce
the amount of messages that are queued in LOKitThread, however
an execution time should increase.
Change-Id: I01ce911226a71607c06da6100de323ca555db474
PriorityBlockingQueue doesn't preserve order within equal elements.
This means elements with same priority will be returned in
arbitrary order, which we don't want to have - for example we want
tiles to render in the same order they were added to the queue.
Also there is no measurable or felt benefit that priority bring so
lets just drop PriorityBlockingQueue for LinkedBlockingQueue.
Change-Id: I6ffe0bf896f0e18e8b5ffc75a4001d8f40515a56
CopyOnWriteList is a good thread safe container to store tiles,
however any change to the list makes a internal copy of the
underlaying array which contains the changes. The effect of this
is that this changes aren't immediately shown or only partially
in the other (UI) thread. So they are sometimes partially drawn or
drawn with a delay. This replaces the CopyOnWriteList with a
simple thread unsafe ArrayList and introduces Read/Write locking
to all ArrayList operations. Read operations don't lock, only
a write operation locks access.
Change-Id: I5783c6cde96360a6fd47faa801eec35e4debb792
If you mis-configure your emulator - that's what you get.
Unfortunate that this affects 2x places.
Change-Id: I0b281d96b22ec3ac793c687ee7f3ba1a78784ace
Before TileLayer (which SubTile was a subclass of) held the
image buffer for the whole life cycle of the tile, which wastes
memory in case of SubTile as the image doesn't change (or changes
only when invalidated) for the whole tile lifecycle. This change
changes the SubTile inheritance to a general Layer and adds modified
logic from SingleTileLayer and TileLayer. In addition it now
discards the buffer as soon as it has been uploaded to a texture
so that it doesn't takes up double the memory anymore.
Change-Id: Ia104687d2df529182af412102459952b53e87950