summaryrefslogtreecommitdiffstats
path: root/common/gdi_canvas.c
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of SW_CANVAS_IMAGE_CACHEChristophe Fergeau2015-03-261-6/+2
| | | | | | | | | | | | | | | | | | | | Every time it's used, it's in constructs similar to: #ifdef SW_CANVAS_CACHE , SpiceImageCache *bits_cache , SpicePaletteCache *palette_cache #elif defined(SW_CANVAS_IMAGE_CACHE) , SpiceImageCache *bits_cache #endif This can be rewritten as: , SpiceImageCache *bits_cache #ifdef SW_CANVAS_CACHE , SpicePaletteCache *palette_cache #endif allowing to get rid of SW_CANVAS_IMAGE_CACHE.
* gdi: fix path segments drawing天外银龙2014-11-101-1/+1
| | | | | Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=64698
* Fix invalid macro usageMarc-André Lureau2012-06-301-1/+1
|
* Add a return value to the default case in create_bitmap to satisfy VC++Aric Stewart2012-04-171-1/+1
|
* Remove need for SPICE_CANVAS_INTERNALMarc-André Lureau2012-03-201-4/+0
| | | | Why is this useful?
* Use a log handler to modify abort() behaviourMarc-André Lureau2012-03-201-47/+59
| | | | | | | | | | | | | | | Be more library friendly, by not aborting in library errors. spice_common now includes a proper log handler that will abort by default when reaching a warning. SPICE_ABORT_LEVEL can be changed to modify run-time abort level. SPICE_DEBUG_LEVEL can be changed to be more verbose. By default, only log level more importants than WARNING. Only memory-related functions are allowed to abort(), since they are not recoverable errors in the library.
* Remove trailing whitespace from end of linesDaniel P. Berrange2012-03-201-23/+22
|
* Remove trailing blank linesDaniel P. Berrange2012-03-201-1/+0
| | | | Remove any blank lines at the end of all source files
* Remove useless if() before free()Daniel P. Berrange2012-03-201-3/+1
| | | | | The free() function allows NULL to be passed in, so any code which puts a if() before free() is wasting time
* Death to all TABsDaniel P. Berrange2012-03-201-21/+21
| | | | | | Source files should all use spaces instead of tabs for indentation. Update the few files not already in compliance
* client/windows: fix several assigned but not used errorsAlon Levy2012-03-201-15/+9
|
* client/common: mingw32: workaround HAVE_STDLIB_H redefined in jconfig.hAlon Levy2012-03-201-0/+3
|
* add #include <config.h> to all source filesChristophe Fergeau2012-03-201-1/+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
* autotools: correctly build canvas-related codeChristophe Fergeau2012-03-201-0/+5
| | | | | | | | | | | | | | | | | | | | | spice client and spice server shares code from common/{gdi,gl,sw}_canvas.[ch]. However, while most of the code is shared, the server code wants a canvas compiled with SW_CANVAS_IMAGE_CACHE defined while the client code wants a canvas compiled with SW_CANVAS_CACHE. The initial autotools refactoring didn't take that into account, this is now fixed by this commit. After this commit, the canvas files from common/ are no longer compiled as part of the libspice-common.la convenience library. Instead, there are "proxy" canvas source files in client/ and server/ which #include the appropriate C files after defining the relevant #define for the binary that is being built. To prevent misuse of the canvas c files and headers in common/, SPICE_CANVAS_INTERNAL must be set when including the canvas headers from common/ or when building the c files from common/ otherwise the build will error out.
* use foo(void) instead of foo() in prototypesChristophe Fergeau2012-03-201-1/+1
| | | | | In C, the latter isn't a prototype for a function with no arg, but declares a function with an undefined number of args.
* mingw32 build: various fixesAlon Levy2012-03-201-2/+2
|
* mingw32 build: fix build errorsGerd Hoffmann2012-03-201-2/+2
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Fix various misspellingsAlexander Larsson2012-03-201-1/+1
| | | | | | | | | | | | | letancy -> latency compund -> compound SpicedSubMessage -> SpiceSubMessage modifaiers -> modifiers massage -> message outgoiong -> outgoing AlphaBlnd -> AlphaBlend remoth -> remote modifires -> modifiers secore -> secure
* Properly parse QXLLineAttrs.styleAlexander Larsson2012-03-201-2/+1
|
* Convert SpicePath.segments to a pointer arrayAlexander Larsson2012-03-201-8/+5
|
* Fix build on win32Alexander Larsson2012-03-201-18/+18
|
* Update for the SpicePath.segments type changeAlexander Larsson2012-03-201-1/+1
|
* Simplify SpiceLineAttr by removing unsed stuffAlexander Larsson2012-03-201-41/+4
| | | | Also in new protocol don't send style data if not needed.
* Store SpicePath segment count rather than sizeAlexander Larsson2012-03-201-9/+6
| | | | | | | | | | | | | | | | | | | 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
* Remove support for clip by pathAlexander Larsson2012-03-201-6/+0
| | | | This is not supported currently anyway and was not generated before.
* applying zlib compression over glz on WAN connectionYonit Halperin2012-03-201-1/+3
|
* Client: Use the autogenerated demarshallersAlexander Larsson2012-03-201-17/+0
| | | | | | | | | | | | | | | | When a message has been read from the network we now pass it into the generated demarshaller for the channel. The demarshaller converts the network data to in-memory structures that is passed on to the spice internals. Additionally it also: * Converts endianness * Validates sizes of message and any pointers in it * Localizes offsets (converts them to pointers) * Checks for zero offsets in messages where they are not supported Some of this was previously done using custom code in the client, this is now removed.
* There are multiple line attribute flags enums, use only oneAlexander Larsson2012-03-201-2/+2
|
* JPEG support: introducing jpeg encoding for spice bitmapsYonit Halperin2012-03-201-1/+3
|
* Remove all mentions of "cairo" from the codeAlexander Larsson2012-03-201-5/+5
| | | | | The command line option is renamed from "cairo" to "sw", and similarly all filenames and types from Cairo to Sw (and similar).
* win32 client: Remove unnecessary GDIImage typeAlexander Larsson2012-03-201-67/+40
| | | | We just use pixman_image_t as the "information about image data" structure.
* Win32 canvas fixesAlexander Larsson2012-03-201-9/+9
|
* Make client canvas and pixmaps handle more formats and simplifyAlexander Larsson2012-03-201-2/+2
| | | | | | | | | | | 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.
* Relicense everything from GPL to LGPL 2.1+Alexander Larsson2012-03-201-9/+9
|
* spice: win32 client: fix gdi lockingIzik Eidus2012-03-201-46/+111
| | | | | | | | | | | While the fix could have been more effective, it seems like this patch stream better with the coding logic that was there..., maybe later we will want to change the locking into more effective way. (There is just the primary surface to protect in reiality) Signed-off-by: Izik Eidus <ieidus@redhat.com>
* spice: common: gdi_canvas fix gdi objects leakIzik Eidus2012-03-201-0/+1
| | | | | | | | | | | BitmapMask was used by the draw_text function as well therefore we need to mark from_surface = 0 if we want it to release the boject... (Was evil, took me few hours to understand from where the leak come...) Signed-off-by: Izik Eidus <ieidus@redhat.com>
* libspice: add off screens supportIzik Eidus2012-03-201-181/+284
| | | | Signed-off-by: Izik Eidus <ieidus@redhat.com>
* Use the spice allocator in common/Alexander Larsson2012-03-201-3/+3
|
* Update gdi canvas wrt latest changesAlexander Larsson2012-03-201-2/+2
| | | | ALIGN -> SPICE_ALIGN
* Move canvas_region and group_start/end to canvas_baseAlexander Larsson2012-03-201-2/+4
|
* Move virtualization of canvas drawing into common/canvas_baseAlexander Larsson2012-03-201-37/+70
| | | | | | | | | | | Instead of having two virtualizations of the canvas we push the virtualization into the canvas code itself. This not only avoids the duplication of this code, it also makes the exposed API for the canvas much smaller (in terms of exported API). It also lets us use the virtualization to implement basic support for operations in canvas_base which is then overridden by each canvas implementation.
* Make glz_decoder non-optional canvas_base in canvas constructorsAlexander Larsson2012-03-201-7/+1
| | | | | It can still be NULL, but we simplify the headers by always including it. There is no practical performance difference here.
* Make canvas Glz decoder integration nicerAlexander Larsson2012-03-201-3/+2
| | | | | We use a dynamic interface similar to e.g. SpiceImageCache instead of passing both function and opaque
* Make gdi canvas build in the new pixman worldLarsson@.(none)2012-03-201-14/+17
|
* Add possibility to not invert bitmask in canvas_get_mask()Alexander Larsson2012-03-201-1/+1
| | | | | This allows the pixman implementation to instead invert the (generally smaller) region instead of duplicating the bitmap to invert it.
* Use pixman_image_t instead of cairo_surface_t as the generic pixman containerAlexander Larsson2012-03-201-78/+78
| | | | | | This allows us to use the simpler dependency of pixman outside of the cairo backend, and it later lets us move the cairo backend to using pixman only.
* Turn image and palette cache into c style dynamic interfaceAlexander Larsson2012-03-201-16/+6
| | | | | | Instead of passing a bunch of function pointer and an opaque pointer we make a real type and add a vtable pointer to it. This means we can simplify all the canvas constructors, etc.
* Add emacs settings for indent according to spice styleguideAlexander Larsson2012-03-201-0/+1
|
* Use standard int types and <spice/types.h>Alexander Larsson2012-03-201-1/+1
|
* Rename symbols that were changed in spice-protocolAlexander Larsson2012-03-201-117/+117
| | | | | | This is an automatic change using: $ find -name "*.[ch]" | xargs ../spice-protocol/rename-identifiers.sh ../spice-protocol/renames $ find -name "*.cpp" | xargs ../spice-protocol/rename-identifiers.sh ../spice-protocol/renames