summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
...
* LZ4: Add support for 24bit pixman surfacesJavier Celaya2015-02-032-0/+11
|
* LZ4: Fix the row alignment when it is not on a 32bit boundaryJavier Celaya2015-02-031-2/+20
| | | | | | Fix the row alignment for 16/24 bpp images when it is not in a 32bit boundary. This is needed for 16bpp images when the width is an odd number, and for the future support of 24bpp images.
* LZ4: Decode the image format from the streamJavier Celaya2015-02-031-1/+19
|
* LZ4: Adjust reading the top_down flagJavier Celaya2015-02-031-4/+4
| | | | | Adjust the way the top_down flag is read to the corresponding change in the wire protocol.
* LZ4: Fix output buffer sizeJavier Celaya2015-02-031-2/+4
|
* Remove redundant #if defined(SW_CANVAS_CACHE) || defined(SW_CANVAS_IMAGE_CACHE)Christophe Fergeau2015-01-231-37/+1
| | | | | | | SW_CANVAS_CACHE is always defined when building spice-gtk, SW_CANVAS_IMAGE_CACHE is always defined when building spice-server, and they are the only 2 users of spice-common. Moreover, build when none of these is defined is broken.
* Remove unused 'invers' arg from canvas_get_*Christophe Fergeau2015-01-231-67/+11
| | | | | | | All canvas_get_{quic,jpeg,lz4,jpeg_alpha,lz} methods have an 'invers' argument, but are always called with that argument being 0, so we can drop it from the argument list, and remove the code triggerring when it's true.
* common: fix build with mingwVictor Toso2015-01-061-1/+1
|
* build-sys: Move pixman check to m4 macroChristophe Fergeau2014-12-091-1/+0
|
* build-sys: Move opengl check to m4 macroChristophe Fergeau2014-12-091-1/+0
|
* build-sys: Move opus check to m4 macroChristophe Fergeau2014-12-091-2/+1
|
* build-sys: Move celt check to m4 macroChristophe Fergeau2014-12-091-3/+1
|
* build-sys: Move smartcard check to m4 macroChristophe Fergeau2014-12-091-1/+2
|
* build-sys: Small cleanup of AM_CPPFLAGSChristophe Fergeau2014-12-091-3/+0
| | | | | | | | Commit 4fafa210 added WARN_CFLAGS, VISIBILITY_HIDDEN_CFLAGS and -std=gnu99 to AM_CFLAGS in common/Makefile.am, but these are not needed. WARN_CFLAGS and VISIBILITY_HIDDEN_CFLAGS are not defined anywhere in spice-common, and spice-common compiles fine without -std=gnu99 on my f21 box.
* Remove unused header fileChristophe Fergeau2014-12-043-44/+0
| | | | | Nothing uses the definition it contains (I've tested spice-gtk and spice)
* Add LZ4 image compression support.Javier Celaya2014-12-022-1/+73
| | | | | | | - Add a new LZ4 image type to spice.proto. - Add canvas_get_lz4() to common_canvas_base, to get a pixmap from an lz4 image. - Add an enable-lz4 switch to the configure script, disabled by default.
* glc: Fix "warning: unused variable 'recreate'"Christophe Fergeau2014-11-241-1/+1
|
* gdi: fix path segments drawing天外银龙2014-11-101-1/+1
| | | | | Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=64698
* common: Fix -Wunused-variableVictor Toso2014-10-231-0/+6
| | | | | Fix a few warnings from unused variables when compiling spice-common without OPUS or celt051.
* common: Fix -Wmissing-field-initializersFabiano Fidêncio2014-09-181-1/+1
|
* common: Fix -Wsign-compareFabiano Fidêncio2014-09-181-2/+2
|
* common: Fix -Wunused-parameterFabiano Fidêncio2014-09-188-22/+46
|
* common: Remove dead codeFabiano Fidêncio2014-09-181-9/+0
|
* quic_family_tmpl: Fix "FORWARD_NULL" caught by coverityFabiano Fidêncio2014-07-231-0/+2
| | | | Ensure the received bucket is non NULL
* quic: Fix "UNINIT" caught by coverityFabiano Fidêncio2014-07-231-7/+5
| | | | | In case of the model evolution mode has a obsolete or non-valid value, just return, avoiding then the usage of non initalized variables.
* quic: Fix melcstate "OVERRUN" caught by coverityFabiano Fidêncio2014-07-141-4/+4
| | | | | | | Check for MELCSTATES - 1 to get inside the branch, otherwise (...)->rgb_state.melcstate may be up to MELCSTATES after the pre-incrementing, which would result in an access to a position that is out bounds of the array size MELCSTATES.
* Mark sw_canvas.[ch] as automake source filesChristophe Fergeau2014-05-071-2/+10
| | | | | | | | | | | | | These 2 files are not build as part of spice-common build system, but modules using spice-common will build them with the appropriate options. We need to let automake know that these are source files so that it can properly track these files dependencies. Without this change, when eg spice-gtk switches to use 'subdir-objects' to build sw_canvas.c as recommended by automake 1.14, the build will fail because $(top_srcdir)/spice-common/common/.deps/sw_canvas.Plo will not have been generated.
* Use #include "common/..." in (de)marshallersChristophe Fergeau2014-04-161-7/+8
| | | | | | | | Now that they are created in $builddir, their includes will need to refer to files in $srcdir, which can be different. It's cleaner to add -I $(top_srcdir)/spice-common/ to modules using spice-common rather than having -I $(top_srcdir)/spice-common/common which would could create header collisions.
* Fix generation of marshallers in VPATH buildsChristophe Fergeau2014-04-161-9/+9
| | | | | | | | | | | | | | | | | | | | | The rules to generate the .c/.h (de)marshalling files have targets based in $builddir, but the CLIENT_MARSHALLERS/SERVER_MARSHALLERS list refer to files in $srcdir. When using a $srcdir != $builddir, these $srcdir files will not exist, and it will not be possible to generate them, which causes the build to fail. When using $srcdir == $builddir from git or from tarballs, this will not make a difference. When building from git, if $srcdir and $builddir are the same, then the files will be found regardless of if we look for them in $srcdir or $builddir as they are the same. In tarballs, the files will be shipped with the tarball and thus available in $srcdir. As $builddir is the same as $srcdir, the files will already exist and not be regenerated. The only change of behaviour will be when using a tarball and doing a $srcdir != $builddir build. In this case, the files will need to be regenerated, so the tools needed for that must be installed on the machine doing the build.
* quic: Fix test which is always trueChristophe Fergeau2014-01-201-1/+1
| | | | | | | | | find_model_params() is first doing *nbuckets = 0; and it then checks nbuckets for NULL. This is redundant as the dereferencing would cause a segfault if nbuckets was NULL, so the if (nbuckets) test can't be false. As Uri pointed out, the "/* bucket start */" comment on the same line probably implies that the test was meant to be 'if (*nbuckets)' I've ran a few test and I did not observe issues because of it...
* ssl: Don't use uninitialized variable in verify_subject()Christophe Fergeau2014-01-072-12/+9
| | | | | | | | | | | | If verify_subject() is called with a SpiceOpenSSLVerify struct containing a non-NULL 'in_subject' member, it would try to use the local 'in_entries' variable without having initialized it first. This could happen if verify_subject() was called multiple time with the same SpiceOpenSSLVerify context, which probably isn't occurring the way we are using it. However, since verify_subject() is the only method which needs in_subject, we don't need to have it stored in SpiceOpenSSLVerify, and we can recreate it as needed locally in that method, which avoids that issue.
* mi: Fix shadow warningsChristophe Fergeau2014-01-071-4/+0
| | | | | Based off a xserver commit from Yaakov Selkowitz: http://cgit.freedesktop.org/xorg/xserver/commit/mi/mispans.c?id=f02e27e4fcc34413b2051e5a01edc92172fa8612
* mi: fix memory leak in miFillUniqueSpanGroupChristophe Fergeau2014-01-071-0/+2
| | | | | | | | | This is based off the corresponding xserver commit from Tiago Vignatti: http://cgit.freedesktop.org/xorg/xserver/commit/mi/mispans.c?id=7ae46b69ba3f05f46529131e6a864904967cde3a Since xrealloc is #defined to spice_realloc which aborts on failure, this block is dead code, but I prefer to stay as close as possible to the upstream xserver code this is based on.
* mi: Avoid stack smash when drawing dashed linesChristophe Fergeau2014-01-071-3/+3
| | | | | Based off Peter Harris's xserver commit http://cgit.freedesktop.org/xorg/xserver/commit/mi/miwideline.c?id=20c2a3bcb11b5baf564e2c73a477ba23f5ae2b10
* quic: Add missing break; in switch/caseChristophe Fergeau2014-01-071-0/+2
| | | | | | Unhandled values call an error callback, and then fall through the default: case, which will call again the error callback. This commit adds some break; after these cases to avoid this.
* backtrace: Don't attempt to call seteuid(0)Christophe Fergeau2014-01-071-1/+0
| | | | | | | We are mostly likely not running as root, so this call will fail. As we are supposed to check its return value as it's declared with warn_unused_result, the current way of using it is wrong, so this commit just removes the call.
* Remove unused variableChristophe Fergeau2014-01-071-2/+0
| | | | It was assigned a value, but then the value was never used.
* Add support for the Opus codec.Jeremy White2014-01-023-12/+141
| | | | Signed-off-by: Jeremy White <jwhite@codeweavers.com>
* Add a snd_codec interface to abstract the use of audio codecs such as celt.Jeremy White2014-01-023-0/+356
| | | | Signed-off-by: Jeremy White <jwhite@codeweavers.com>
* ssl: Don't try hostname check if cert subject check failsChristophe Fergeau2013-10-111-8/+5
| | | | | | | | | | | | | | | | | | Currently, SSL verification of the peer certificate checks if the certificate's subject CN or one of its subjectAltName match the hostname. If this succeeds, then the verification succeeds. Otherwise openssl_verify() checks the cert subject if this was set, which means it checks the certificate's subject (not just its CN) matches exactly the cert subject string that is set in SpiceSession. Given that the cert subject is something the user specifies in addition to the hostname, the cert subject check should have priority over the hostname check, that is, when we have a cert subject set, the success/failure of the cert subject cert should determine the success/failure of openssl_verify(), and the hostname check should only be carried out when no cert subject was set. This fixes rhbz#871034
* ssl: Log an error when peer certificate verification failedChristophe Fergeau2013-10-111-1/+9
| | | | | | | We currently log an error when openssl_verify() is called with preverify_ok set to 0 for all certificates in the certificate chain except for the peer certificate (when 'depth' is 0). This commit logs an error in the latter case as well.
* ssl: Improve error message in cert chain verificationChristophe Fergeau2013-10-111-2/+2
| | | | It contains the same information as before, but should be more readable.
* Remove INLINE usageMarc-André Lureau2013-10-048-48/+48
| | | | Since inline is c99 and its already used in some files
* gl: use glCopyPixels()Marc-André Lureau2013-09-301-1/+1
| | | | | | | I don't see why the fallback method should be the default. glCopyTexImage2D and glCopyPixels are equally broken with current Intel mesa/drivers (I'll be filing a bug). But sw rendering is correct.
* gl: cope with positive stride in put_image()Marc-André Lureau2013-09-301-3/+7
| | | | Keeping the warning, because I don't think this should happen anyway.
* gl: ignore alpha channel in draw_copyMarc-André Lureau2013-09-301-0/+1
| | | | Similar to sw canvas blit copy operation, and not a blend.
* gl: ignore if mask has not bitmapMarc-André Lureau2013-09-301-1/+2
| | | | Similar to how sw canvas ignore mask if !bitmap in canvas_mask_pixman().
* quic: precompute golomb codesMarc-André Lureau2013-09-122-14/+33
| | | | | | | | | | | | | We can avoid repetitive computation by using two precomputed array, of 8k each. before: 1.79% lt-spicy-stats libspice-client-glib-2.0.so.8.4.0 [.] golomb_code_len_8bpc after: 0.79% lt-spicy-stats libspice-client-glib-2.0.so.8.4.0 [.] golomb_code_len_8bpc
* quic: compile with constant bppMarc-André Lureau2013-09-123-13/+13
| | | | | This simplifies a little bit function calling, and allows for compiler to potentially specialize and optimize a bit better each version.
* canvas: use precomputed revers_bitsMarc-André Lureau2013-09-121-0/+43
| | | | | | | | | | | | | Thos function shows up in some profiling results, it seems we can trivially replace it with a precomputed array of 256bytes. before: 5.66% 691 lt-spicy-stats libspice-client-glib-2.0.so.8.4.0 [.] revers_bits after: 0.53% 64 lt-spicy-stats libspice-client-glib-2.0.so.8.4.0 [.] revers_bits