summaryrefslogtreecommitdiffstats
path: root/server/red_parse_qxl.c
Commit message (Collapse)AuthorAgeFilesLines
* red_parse_qxl: Change spice_error() to spice_warning()Christophe Fergeau2013-09-021-3/+4
| | | | | | | | After eb09c25c, red_parse_qxl.c still has some spice_error() which will kill the server even though the code is trying to return an error when the spice_error() is hit. This commit replaces these occurrences with a spice_warning() which will not kill spice-server.
* server: bitmap_consistent: replace spice_error with spice_warningUri Lublin2013-09-021-1/+1
| | | | | | | | | bitmap_consistent should return true or false. Currently it aborts instead of returning false, due to spice_error. Replacing spice_error with spice_warning, provides information and returns false, as expected. This fixes Fedora bz#997932
* syntax-check: remove trailing whitespacesUri Lublin2013-07-161-3/+2
| | | | Only whitespace changes in this commit.
* syntax-check: fix avoid_if_before_freeUri Lublin2013-07-161-6/+2
|
* server/red_parse_qxl: two coding convention pointer cast fixAlon Levy2013-05-171-2/+2
|
* red_parse_qxl: fix throwing away drawables that have masksYonit Halperin2012-12-201-14/+13
| | | | | | | Non rgb bitmaps are allowed to not have a palette in case they are masks (which are 1BIT bitmaps). Related: rhbz#864982
* server/red_parse_qxl: fix bitmap_consistent againAlon Levy2012-09-051-2/+2
|
* server/red_parse_qxl: fix wrong bitmap_consistentAlon Levy2012-09-051-5/+26
| | | | | The bit calculation was wrong for all the paletted types by a factor of between 8 and 1 (SPICE_BITMAP_FMT_{1,4,8}BIT_PLT_{LE,BE})
* server/red_parse_qxl: add bitmap consistency checkAlon Levy2012-09-031-0/+17
| | | | | | | | | | | Just checks stride vs width times bpp. This fixes a potential abort on guest generated bad images in glz_encoder. Other files touched to move some consts to red_common, they are static so no problem to be defined in both red_worker.c and red_parse_qxl.c .
* Add support for QXLComposite to spice serverSøren Sandmann Pedersen2012-08-241-1/+58
| | | | | | In red-parse-qxl.c add support for parsing QXLComposite into SpiceComposite. In red-worker.c add support for marshalling SpiceComposite onto the wire.
* Add support for LZ compression of A8 imagesSøren Sandmann Pedersen2012-08-241-1/+1
| | | | | | Graduality is irrelevant for A8 images, so instead of using RGB-ness as a short-cut, add a new macro BITMAP_FMT_HAS_GRADUALITY() that returns true for the existing RGB images, but false for A8.
* server/red_parse_qxl: red_get_image: fix leaks on bad imageAlon Levy2012-07-221-8/+16
|
* server/red_parse_qxl: disallow zero area bitmapsAlon Levy2012-07-221-0/+4
| | | | | | prevents division by zero later (SIGFPE, Arithmetic exception) in spice-common code, at spice-common/common/canvas_base.c:646 for both client and server (server only upon rendering).
* server/red_parse_qxl: get_path: remove return NULLAlon Levy2012-07-221-1/+0
| | | | introduced by 2ec2dbc78a660ee4e3315f50c881d9e31a8e4fe2
* server: don't abort on guest images with missing palettesAlon Levy2012-07-221-0/+9
|
* server: move self_bitmap_image to RedDrawableAlon Levy2012-05-151-0/+3
| | | | | | | Simplify keeping count of self_bitmap_image by putting it in RedDrawable. It is allocated on reading from the command pipe and deallocated when the last reference to the RedDrawable is dropped, instead of keeping track of it in GlzDrawable and Drawable.
* server: allow failure in getvirtAlon Levy2012-04-051-53/+158
| | | | | | | This patch changed getvirt to continue working even if spice_critical doesn't abort (i.e. SPICE_ABORT_LEVEL != -1). This is in preparation to make getvirt not abort at all. The reason is that getvirt is run on guest provided memory, so a bad driver can crash the vm.
* Use the spice-common logging functionsMarc-André Lureau2012-03-251-23/+22
| | | | | It will abort by default for critical level messages. That behaviour can be tuned at runtime.
* Remove trailing blank linesDaniel P. Berrange2012-01-131-1/+0
| | | | Remove any blank lines at the end of all source files
* Remove useless if() before free()Daniel P. Berrange2012-01-131-3/+1
| | | | | The free() function allows NULL to be passed in, so any code which puts a if() before free() is wasting time
* server/red_parse_qxl.h: License should be LGPLv2+ rather then GPLv2+Hans de Goede2011-12-151-3/+3
| | | | | | | Also fixup the header of server/red_parse_qxl.c, which still contained some GPL (program rather then library) text in its header. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* server: add async io supportAlon Levy2011-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The new _ASYNC io's in qxl_dev listed at the end get six new api functions, and an additional callback function "async_complete". When the async version of a specific io is used, completion is notified by calling async_complete, and no READY message is written or expected by the dispatcher. update_area has been changed to push QXLRects to the worker thread, where the conversion to SpiceRect takes place. A cookie has been added to each async call to QXLWorker, and is passed back via async_complete. Added api: QXLWorker: update_area_async add_memslot_async destroy_surfaces_async destroy_primary_surface_async create_primary_surface_async destroy_surface_wait_async QXLInterface: async_complete
* add #include <config.h> to all source filesChristophe Fergeau2011-05-031-0/+3
| | | | | | | | When using config.h, it must be the very first include in all source files since it contains #define that may change the compilation process (eg libc structure layout changes when it's used to enable large file support on 32 bit x86 archs). This commit adds it at the beginning of all .c and .cpp files
* client/server: warning fixes (gcc 4.6.0)Alon Levy2011-01-251-2/+1
| | | | | gcc 4.6.0 added "[-Werror=unused-but-set-variable]", this and the next few fixes tend to that. Mostly harmless.
* Update license header for server/red_parse_qxl.cHans de Goede2011-01-211-6/+6
| | | | This one mistakenly had a GPL header rather then an LGPL header.
* server: Don't leak QUIC image chunksAlexander Larsson2010-09-211-0/+3
| | | | | red_put_image() needs to free the chunks for QUIC images, as we allocate these when creating the image.
* fix palette handling for 0.4 compatGerd Hoffmann2010-09-141-43/+56
| | | | | spice 0.4 guests pass 16bpp palette colors when running in a 16bpp video mode. Convert them to 32bpp.
* fix brush handling for 0.4 compatGerd Hoffmann2010-09-141-23/+38
| | | | | spice 0.4 guests pass 16bpp colors for brushes when running in a 16bpp video mode. Convert them to 32bpp.
* move command flags handling to the qxl parserGerd Hoffmann2010-09-141-4/+14
| | | | | Pass through command flags to the qxl parser, so we can hide all compat bits for spice 0.4 within the qxl parser.
* qxl parser: complete parsing of QXLCompatDrawable structsGerd Hoffmann2010-08-311-0/+14
|
* red_get_cursor: avoid extra copyGerd Hoffmann2010-08-271-4/+4
|
* qxl parser: add cursor parsingGerd Hoffmann2010-08-261-2/+44
|
* qxl parser: complete QXL_SURFACE_CMD_CREATE parsingGerd Hoffmann2010-08-261-1/+4
|
* Fix various misspellingsAlexander Larsson2010-07-081-3/+3
| | | | | | | | | | | | | letancy -> latency compund -> compound SpicedSubMessage -> SpiceSubMessage modifaiers -> modifiers massage -> message outgoiong -> outgoing AlphaBlnd -> AlphaBlend remoth -> remote modifires -> modifiers secore -> secure
* Use QXLPHYSICAL, not SPICE_ADDRESS in qxl parserAlexander Larsson2010-07-081-13/+13
|
* Properly parse QXLLineAttrs.styleAlexander Larsson2010-07-081-12/+23
|
* Properly parse QXLImage to the new-world SpiceImageGerd Hoffmann2010-07-071-15/+263
| | | | | SpiceImage now replaces RedImage and has all image types in it. All image data are now chunked (and as such not copied when demarshalling).
* Convert SpicePath.segments to a pointer arrayAlexander Larsson2010-07-051-4/+5
|
* Properly parse and marshall SpiceStringGerd Hoffmann2010-07-021-2/+85
|
* Update for the SpicePath.segments type changeAlexander Larsson2010-07-011-1/+1
|
* Simplify SpiceLineAttr by removing unsed stuffAlexander Larsson2010-06-301-6/+7
| | | | Also in new protocol don't send style data if not needed.
* Store SpicePath segment count rather than sizeAlexander Larsson2010-06-301-6/+37
| | | | | | | | | | | | | | | | | | | Internally and in the network protocol (for the new version) we now store the actual number of segments rather than the size of the full segments array in bytes. This change consists of multiple changes to handle this: * Make the qxl parser calculate num_segments * Make the canvas stroke code handle the new SpicePath layout. * Fix up is_equal_path in red_worker.c for the new layout * replace multiple calls to spice_marshall_PathSegment with a single spice_marshall_Path call * Make the byte_size() array size handling do the conversion from network size to number of elements when marshalling/demarshalling. * Update the current spice protocol to send the segment count rather than the size * Update the old spice protocol to use the new byte_size functionallity to calculate the size sent and the number of elements recieved
* qxl-abi: handle clip rect and path references.Gerd Hoffmann2010-06-301-11/+173
| | | | | | | | | | | | red_parse_qxl.c starts to follow QXLPHYSICAL references and build up data structures. Can zap a bunch of get_virt calls in red_worker.c, followed by cleanups. (de-) marshaller needs updates to deal with that. Also I suspect with the get_virt() calls being gone we can offload more work to generated marshaller code. client doesn't build.
* add qxl chunk parserGerd Hoffmann2010-06-301-0/+44
|
* qxl abi: parse QXLRect.Gerd Hoffmann2010-06-291-13/+21
|
* qxl abi: parse QXLPoint & friends.Gerd Hoffmann2010-06-291-6/+18
|
* qxl abi: parse QXLCursorCmd.Gerd Hoffmann2010-06-291-0/+30
|
* qxl abi: parse QXLSurfaceCmd.Gerd Hoffmann2010-06-291-0/+28
|
* qxl abi: parse QXLMessage.Gerd Hoffmann2010-06-291-0/+22
|
* qxl abi: parse QXLUpdateCmd.Gerd Hoffmann2010-06-291-0/+18
|