Input 20190111 patches
The following changes since commit a311f891abf3833c1e4c5a62a6e5b0f1b81f22c3:
Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-4.0-pull-request' into staging (2019-01-10 17:49:54 +0000)
are available in the git repository at:
git://git.kraxel.org/qemu tags/input-20190111-pull-request
for you to fetch changes up to 7a1b46e09504419a3aa867dba3bcf23db5d6d956:
input: avoid malloc for mouse events (2019-01-11 11:57:17 +0100)
----------------------------------------------------------------
input: avoid malloc for mouse events
----------------------------------------------------------------
Gerd Hoffmann (1):
input: avoid malloc for mouse events
include/ui/input.h | 3 --- ui/input.c | 68 +++++++++++++++++++++++++----------------------------- 2 files changed, 31 insertions(+), 40 deletions(-)
Signature · 1 line
2.9.3
[Qemu-devel] [PULL 1/1] input: avoid malloc for mouse events
There is no reason to allocate mouse events using malloc, we can allcoate them from stack instead, save a few cpu cycles and make the code more readable with c99 initializers.
Message-id: [email protected]
--- include/ui/input.h | 3 --- ui/input.c | 68 +++++++++++++++++++++++++----------------------------- 2 files changed, 31 insertions(+), 40 deletions(-)
include/ui/input.h +0 -3
@@ -49,7 +49,6 @@ int qemu_input_key_value_to_scancode(const KeyValue *value, bool down, int *codes);int qemu_input_linux_to_qcode (unsigned int lnx); -InputEvent *qemu_input_event_new_btn (InputButton btn,bool down);void qemu_input_queue_btn (QemuConsole *src,InputButton btn,bool down);void qemu_input_update_buttons (QemuConsole *src,uint32_t *button_map,uint32_t button_old,uint32_t button_new);
@@ -58,8 +57,6 @@ bool qemu_input_is_absolute(void);int qemu_input_scale_axis (int value,int min_in,int max_in,int min_out,int max_out); -InputEvent *qemu_input_event_new_move (InputEventKind kind, -InputAxis axis,int value);void qemu_input_queue_rel (QemuConsole *src,InputAxis axis,int value);void qemu_input_queue_abs (QemuConsole *src,InputAxis axis,int value,int min_in,int max_in);
ui/input.c +31 -37
90 lines not on this page · raw message
Signature · 1 line
2.9.3
Peter Maydell
AppliedQuoted 16 lines · Gerd Hoffmann
The following changes since commit
a311f891abf3833c1e4c5a62a6e5b0f1b81f22c3:Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-4.0-pull-request' into staging (2019-01-10 17:49:54 +0000)
are available in the git repository at:
git://git.kraxel.org/qemutags/input-20190111-pull-requestfor you to fetch changes up to
7a1b46e09504419a3aa867dba3bcf23db5d6d956:input: avoid malloc for mouse events (2019-01-11 11:57:17 +0100)
----------------------------------------------------------------
input: avoid malloc for mouse events
Quoted 9 lines
----------------------------------------------------------------
Gerd Hoffmann (1):
input: avoid malloc for mouse eventsinclude/ui/input.h | 3 --- ui/input.c | 68 +++++++++++++++++++++++++----------------------------- 2 files changed, 31 insertions(+), 40 deletions(-)
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.0
for any user-visible changes.
-- PMM