Commit Graph

105 Commits

Author SHA1 Message Date
Gerd Hoffmann
2e47435ecb constify SpiceBaseInterface 2010-05-19 11:22:07 +02:00
Gerd Hoffmann
6fdcb9310d SoundInterfaces: redesign 2010-05-19 11:22:07 +02:00
Gerd Hoffmann
4701a063da TabletInterface: redesign 2010-05-19 11:22:07 +02:00
Gerd Hoffmann
d3735feea6 QXL: redesign. 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
58273e3a32 MouseInterface: redesign 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
4461c74918 KeyboardInterface: redesign.
This is the direction I wanna take with all interfaces:  Clearly
separate interface (aka version information and function pointers)
and state information.  SpiceKbdInterface defines the interface,
SpiceKbdInstance maintains per-instance state information.  Keyboard
hasn't much beside a pointer to SpiceKbdInterface, for other
interfaces this very likely will be different.
2010-05-19 11:22:06 +02:00
Gerd Hoffmann
10e6d8b53c s/CoreInterface/SpiceCoreInterface/ 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
30c740201d VDInterface: redesign.
VDInterface has been renamed to SpiceBaseInterface. Dropped base_version
element, shlib versioning should be used instead.  Dropped id element,
it is passed to spice_server_add_interface() instead.  Now
SpiceBaseInterface has static information only, multiple interface
instances can share it.

Added SpiceBaseInstance struct for maintaining per-instance state
information.  Adapted spice_server_{add,remove}_interface() functions
to the new world.
2010-05-19 11:22:06 +02:00
Gerd Hoffmann
a97875bc3f minor timer interface cleanups.
Make the timer interface largely look like the watch interface.
Simliar naming convention for the functions (timer_*) and a
opaque SpiceTimer type.
2010-05-19 11:22:06 +02:00
Gerd Hoffmann
536212322b new watch api: kill old api 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
a5145cc93e new watch api: switch channels 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
e8a2cca026 new watch api: switch sound 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
614fa00903 new watch api: switch migration 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
5549de4b10 new watch api: switch inputs 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
d54f1103fa new watch api: switch ssl accept 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
2dda5683b6 new watch api: switch main channel 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
1a69ea6627 new watch api: switch liasync read 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
d1ab29c1af new watch api: switch listening sockets 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
4c67874a6d introduce new watch api
This patch adds a new file handle watch interface to libspice, featuring
three callbacks:

  (1) watch_add() -- create a new file watch.
  (2) watch_update_mask() -- change event mask.  spice frequently
                             enables/disables write notification.
  (3) watch_remove() -- remove a file watch.

libspice users must implement these functions to allow libspice
monitoring file handles.

The old interface (set_file_handlers) doesn't explicitly express the
lifecycle of a watch.  Also it maps 1:1 to a qemu-internal function.
In case the way qemu implements file watches changes (someone sayed
QemuIONotifier?) this will break horribly.  Beside that it is very
bad style.

Follwing patches will switch over users one by one to the new interface
and finally zap the old one.
2010-05-19 11:22:06 +02:00
Gerd Hoffmann
91f747ea1d fix visibility 2010-05-19 11:22:05 +02:00
Gerd Hoffmann
fe8b838341 zap CoreInterface->{term_printf,log}
Was used to print stuff to the qemu monitor.
Fundamentally incompatible with QMP.  Remove.
2010-05-19 11:22:05 +02:00
Gerd Hoffmann
3f7ea8e7a4 zap qterm interfaces
old way to handle monitor, obsolete.
2010-05-19 11:22:05 +02:00
Gerd Hoffmann
881c685f90 zap CoreInterface->(un)register_change_notifiers()
spice_server_add_interface() and spice_server_remove_interface()
can be used instead.
2010-05-19 11:22:05 +02:00
Gerd Hoffmann
df95728bf0 zap CoreInterface->next()
Interfaces must be registered after spice_server_init().
The "next" callback is used to discover interfaces
registered before spice_server_init().  Which is a empty
list and thus pretty pointless.  Remove it.
2010-05-19 11:22:05 +02:00
Gerd Hoffmann
43caec519e channel security cleanup
- drop spice_channel_name_t enum, use spice-protocol defines instead.
- switch spice_server_set_channel_security() channel parameter from
  enum to string.
- drop spice_server_set_default_channel_security(), use
  spice_server_set_channel_security with channel == NULL instead.
2010-05-19 11:22:05 +02:00
Gerd Hoffmann
edc1af5f67 zap spice_parse_args + spice_usage_str
First step to throw out the old interface.
2010-05-19 11:22:05 +02:00
Alexander Larsson
25bca7a286 Minor whitespace cleanup 2010-05-19 11:13:47 +02:00
Alexander Larsson
ee1e60c4a0 Make it --enable-tunnel work 2010-05-19 11:13:06 +02:00
Yonit Halperin
66a7c4a5e5 server: fix invalid self loop in surfaces dependencies.
Cyclic dependencies between surfaces mustn't occur. They can cause invalid rendering -
recent drawables might be rendered before older ones.
2010-05-03 16:40:37 +02:00
Dan Kenigsberg
270328e5c0 spice server: fix typo in private key error message 2010-05-03 16:40:37 +02:00
Alexander Larsson
ae40f270cf Remove all mentions of "cairo" from the code
The command line option is renamed from "cairo" to "sw", and
similarly all filenames and types from Cairo to Sw (and similar).
2010-05-03 12:38:02 +02:00
Alexander Larsson
295c8ed8bc Don't send alpha bytes for primary surface
The framebuffer is not used as a source for alpha blends, so we never
need to scan it for alpha bytes.
2010-04-30 09:54:01 +02:00
Gerd Hoffmann
7425253cec iovec: add sanity check
Adds sanity check to iovec setup.  In theory this should never ever
trigger.  In practice guest driver bugs can make it trigger.  This
patch avoids qemu burning cpu in a endless loop, instead we'll print a
message and abort.  Not sure whenever there is a more graceful way to
handle the situation ...
2010-04-29 18:20:15 +02:00
Gerd Hoffmann
ae8429d0c5 fix worker->stop surface cleanup 2010-04-29 18:19:56 +02:00
Alexander Larsson
42e83e3843 Add support for SPICE_IMAGE_FLAGS_HIGH_BITS_SET 2010-04-28 15:43:41 +02:00
Alexander Larsson
c2f38a68ba If we have alpha in a 32bit rgb surface, ensure we send that
If we don't then alpha is lost which is problematic if the surface
is later used as with alpha_blend and SRC_SURFACE_HAS_ALPHA.
2010-04-23 16:41:47 +02:00
Alexander Larsson
395b5a5626 Server: Use the right image format when updating from a surface 2010-04-23 16:41:47 +02:00
Alexander Larsson
4f5a09a73d Make each surface its own depth/format
Surface creation now specifies the exact format, not only the bit depth
of each surface which is used for rendering.

Additionally we now actually store the surfaces in that format, instead
of converting everything to 32bpp when drawing or e.g. handling palettes.
2010-04-23 16:41:42 +02:00
Alexander Larsson
98d91203c5 Make client canvas and pixmaps handle more formats and simplify
We now support 16bit format pixmaps as well as the old ones. Including
both 555 and 565 modes.

We drop the palette argument for pixmap construction as it was only
used for black/white anyway.

Canvas creation is simplified so that there is no separate set_mode
state. Canvases are already created in the right mode and never change.
2010-04-23 16:36:35 +02:00
Izik Eidus
99341e058f spice: server: change update_area command
The new command return dirty area to be used
by users that want spice to render localy or
into some framebuffer (sdl / vnc)

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-14 19:38:49 +03:00
Alexander Larsson
c97116aeb9 Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
Alexander Larsson
288a9ad03f Use fast DCT method for better jpeg compression performance 2010-04-12 20:54:35 +02:00
Izik Eidus
ad1a4849ee spice server: fix validate_chunk
Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-12 13:43:38 +03:00
Izik Eidus
03fb4e05be take the right lock when freeing glz stuff of surfaces
this was noticed by Yonit.

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-09 22:47:03 +03:00
Alexander Larsson
34fb3f6806 Split out the memslot stuff from red_worker.c to its own files
This is required so that we can have code in other files that does address
validation.
2010-04-09 16:51:52 +02:00
Yonit Halperin
a3700a1bfb server: fix race condition in lz global dictionary, in its image segments list 2010-04-09 10:11:09 +02:00
Alexander Larsson
de4306af33 Initialize _kill_mark so we don't get spurious valgrind warnings 2010-04-08 17:09:32 +02:00
Izik Eidus
80e1379ff6 spice server: fix not sent depth size for surfaces
Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-08 10:25:07 +03:00
Yonit Halperin
4acf155fb2 server configuration: make network redirection support optional
By default it is disabled. To enable: configure --enable-tunnel.
When active, requires libslirp.
2010-04-06 17:45:04 +02:00
Izik Eidus
cc943035c9 spice server: try to be less brutal when changing res or when flushing the tree
The idea is that we can try to defer some stuff to be later
send in the pipe if the pipe is not fulled yet, moreover
we will then walk on the pipe using:
red_clear_surface_drawables_from_pipe() and will try to
remove the uneeded objects of this surface

Still some room to improvment but later...

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-06 02:02:38 +03:00