mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2025-12-29 16:35:58 +00:00
Death to all TABs
Source files should all use spaces instead of tabs for indentation. Update the few files not already in compliance
This commit is contained in:
parent
a2e0db03a9
commit
bcdf929c79
@ -69,7 +69,7 @@ struct _SpiceImageCache {
|
||||
|
||||
typedef struct {
|
||||
SpiceCanvas *(*get)(SpiceImageSurfaces *surfaces,
|
||||
uint32_t surface_id);
|
||||
uint32_t surface_id);
|
||||
} SpiceImageSurfacesOps;
|
||||
|
||||
struct _SpiceImageSurfaces {
|
||||
@ -177,10 +177,10 @@ typedef struct {
|
||||
pixman_image_t *tile,
|
||||
int offset_x, int offset_y);
|
||||
void (*fill_tiled_rects_from_surface)(SpiceCanvas *canvas,
|
||||
pixman_box32_t *rects,
|
||||
int n_rects,
|
||||
SpiceCanvas *tile,
|
||||
int offset_x, int offset_y);
|
||||
pixman_box32_t *rects,
|
||||
int n_rects,
|
||||
SpiceCanvas *tile,
|
||||
int offset_x, int offset_y);
|
||||
void (*fill_tiled_rects_rop)(SpiceCanvas *canvas,
|
||||
pixman_box32_t *rects,
|
||||
int n_rects,
|
||||
@ -188,29 +188,29 @@ typedef struct {
|
||||
int offset_x, int offset_y,
|
||||
SpiceROP rop);
|
||||
void (*fill_tiled_rects_rop_from_surface)(SpiceCanvas *canvas,
|
||||
pixman_box32_t *rects,
|
||||
int n_rects,
|
||||
SpiceCanvas *tile,
|
||||
int offset_x, int offset_y,
|
||||
SpiceROP rop);
|
||||
pixman_box32_t *rects,
|
||||
int n_rects,
|
||||
SpiceCanvas *tile,
|
||||
int offset_x, int offset_y,
|
||||
SpiceROP rop);
|
||||
void (*blit_image)(SpiceCanvas *canvas,
|
||||
pixman_region32_t *region,
|
||||
pixman_image_t *src_image,
|
||||
int offset_x, int offset_y);
|
||||
void (*blit_image_from_surface)(SpiceCanvas *canvas,
|
||||
pixman_region32_t *region,
|
||||
SpiceCanvas *src_image,
|
||||
int offset_x, int offset_y);
|
||||
pixman_region32_t *region,
|
||||
SpiceCanvas *src_image,
|
||||
int offset_x, int offset_y);
|
||||
void (*blit_image_rop)(SpiceCanvas *canvas,
|
||||
pixman_region32_t *region,
|
||||
pixman_image_t *src_image,
|
||||
int offset_x, int offset_y,
|
||||
SpiceROP rop);
|
||||
void (*blit_image_rop_from_surface)(SpiceCanvas *canvas,
|
||||
pixman_region32_t *region,
|
||||
SpiceCanvas *src_image,
|
||||
int offset_x, int offset_y,
|
||||
SpiceROP rop);
|
||||
pixman_region32_t *region,
|
||||
SpiceCanvas *src_image,
|
||||
int offset_x, int offset_y,
|
||||
SpiceROP rop);
|
||||
void (*scale_image)(SpiceCanvas *canvas,
|
||||
pixman_region32_t *region,
|
||||
pixman_image_t *src_image,
|
||||
@ -220,13 +220,13 @@ typedef struct {
|
||||
int dest_width, int dest_height,
|
||||
int scale_mode);
|
||||
void (*scale_image_from_surface)(SpiceCanvas *canvas,
|
||||
pixman_region32_t *region,
|
||||
SpiceCanvas *src_image,
|
||||
int src_x, int src_y,
|
||||
int src_width, int src_height,
|
||||
int dest_x, int dest_y,
|
||||
int dest_width, int dest_height,
|
||||
int scale_mode);
|
||||
pixman_region32_t *region,
|
||||
SpiceCanvas *src_image,
|
||||
int src_x, int src_y,
|
||||
int src_width, int src_height,
|
||||
int dest_x, int dest_y,
|
||||
int dest_width, int dest_height,
|
||||
int scale_mode);
|
||||
void (*scale_image_rop)(SpiceCanvas *canvas,
|
||||
pixman_region32_t *region,
|
||||
pixman_image_t *src_image,
|
||||
@ -236,13 +236,13 @@ typedef struct {
|
||||
int dest_width, int dest_height,
|
||||
int scale_mode, SpiceROP rop);
|
||||
void (*scale_image_rop_from_surface)(SpiceCanvas *canvas,
|
||||
pixman_region32_t *region,
|
||||
SpiceCanvas *src_image,
|
||||
int src_x, int src_y,
|
||||
int src_width, int src_height,
|
||||
int dest_x, int dest_y,
|
||||
int dest_width, int dest_height,
|
||||
int scale_mode, SpiceROP rop);
|
||||
pixman_region32_t *region,
|
||||
SpiceCanvas *src_image,
|
||||
int src_x, int src_y,
|
||||
int src_width, int src_height,
|
||||
int dest_x, int dest_y,
|
||||
int dest_width, int dest_height,
|
||||
int scale_mode, SpiceROP rop);
|
||||
void (*blend_image)(SpiceCanvas *canvas,
|
||||
pixman_region32_t *region,
|
||||
int dest_has_alpha,
|
||||
@ -252,14 +252,14 @@ typedef struct {
|
||||
int width, int height,
|
||||
int overall_alpha);
|
||||
void (*blend_image_from_surface)(SpiceCanvas *canvas,
|
||||
pixman_region32_t *region,
|
||||
pixman_region32_t *region,
|
||||
int dest_has_alpha,
|
||||
SpiceCanvas *src_image,
|
||||
SpiceCanvas *src_image,
|
||||
int src_has_alpha,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
int overall_alpha);
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
int overall_alpha);
|
||||
void (*blend_scale_image)(SpiceCanvas *canvas,
|
||||
pixman_region32_t *region,
|
||||
int dest_has_alpha,
|
||||
@ -271,26 +271,26 @@ typedef struct {
|
||||
int scale_mode,
|
||||
int overall_alpha);
|
||||
void (*blend_scale_image_from_surface)(SpiceCanvas *canvas,
|
||||
pixman_region32_t *region,
|
||||
pixman_region32_t *region,
|
||||
int dest_has_alpha,
|
||||
SpiceCanvas *src_image,
|
||||
SpiceCanvas *src_image,
|
||||
int src_has_alpha,
|
||||
int src_x, int src_y,
|
||||
int src_width, int src_height,
|
||||
int dest_x, int dest_y,
|
||||
int dest_width, int dest_height,
|
||||
int scale_mode,
|
||||
int overall_alpha);
|
||||
int src_x, int src_y,
|
||||
int src_width, int src_height,
|
||||
int dest_x, int dest_y,
|
||||
int dest_width, int dest_height,
|
||||
int scale_mode,
|
||||
int overall_alpha);
|
||||
void (*colorkey_image)(SpiceCanvas *canvas,
|
||||
pixman_region32_t *region,
|
||||
pixman_image_t *src_image,
|
||||
int offset_x, int offset_y,
|
||||
uint32_t transparent_color);
|
||||
void (*colorkey_image_from_surface)(SpiceCanvas *canvas,
|
||||
pixman_region32_t *region,
|
||||
SpiceCanvas *src_image,
|
||||
int offset_x, int offset_y,
|
||||
uint32_t transparent_color);
|
||||
pixman_region32_t *region,
|
||||
SpiceCanvas *src_image,
|
||||
int offset_x, int offset_y,
|
||||
uint32_t transparent_color);
|
||||
void (*colorkey_scale_image)(SpiceCanvas *canvas,
|
||||
pixman_region32_t *region,
|
||||
pixman_image_t *src_image,
|
||||
@ -300,13 +300,13 @@ typedef struct {
|
||||
int dest_width, int dest_height,
|
||||
uint32_t transparent_color);
|
||||
void (*colorkey_scale_image_from_surface)(SpiceCanvas *canvas,
|
||||
pixman_region32_t *region,
|
||||
SpiceCanvas *src_image,
|
||||
int src_x, int src_y,
|
||||
int src_width, int src_height,
|
||||
int dest_x, int dest_y,
|
||||
int dest_width, int dest_height,
|
||||
uint32_t transparent_color);
|
||||
pixman_region32_t *region,
|
||||
SpiceCanvas *src_image,
|
||||
int src_x, int src_y,
|
||||
int src_width, int src_height,
|
||||
int dest_x, int dest_y,
|
||||
int dest_width, int dest_height,
|
||||
uint32_t transparent_color);
|
||||
void (*copy_region)(SpiceCanvas *canvas,
|
||||
pixman_region32_t *dest_region,
|
||||
int dx, int dy);
|
||||
|
||||
@ -580,15 +580,15 @@ static uint8_t *create_bitmap(HBITMAP *bitmap, HBITMAP *prev_bitmap, HDC *dc,
|
||||
}
|
||||
|
||||
static uint8_t *create_bitmap_from_pixman(HBITMAP *bitmap, HBITMAP *prev_bitmap, HDC *dc,
|
||||
pixman_image_t *surface, int rotate)
|
||||
pixman_image_t *surface, int rotate)
|
||||
{
|
||||
return create_bitmap(bitmap, prev_bitmap, dc,
|
||||
(uint8_t*)pixman_image_get_data(surface),
|
||||
pixman_image_get_width(surface),
|
||||
pixman_image_get_height(surface),
|
||||
pixman_image_get_stride(surface),
|
||||
spice_pixman_image_get_bpp(surface),
|
||||
rotate);
|
||||
pixman_image_get_width(surface),
|
||||
pixman_image_get_height(surface),
|
||||
pixman_image_get_stride(surface),
|
||||
spice_pixman_image_get_bpp(surface),
|
||||
rotate);
|
||||
}
|
||||
|
||||
|
||||
@ -798,17 +798,17 @@ static struct BitmapData get_mask_bitmap(struct GdiCanvas *canvas, struct SpiceQ
|
||||
|
||||
gdi_surface = (GdiCanvas *)canvas_get_surface_mask(&canvas->base, mask->bitmap);
|
||||
if (gdi_surface) {
|
||||
HBITMAP _bitmap;
|
||||
HBITMAP _bitmap;
|
||||
|
||||
_bitmap = (HBITMAP)GetCurrentObject(gdi_surface->dc, OBJ_BITMAP);
|
||||
if (!_bitmap) {
|
||||
CANVAS_ERROR ("GetCurrentObject failed");
|
||||
}
|
||||
bitmap.dc = gdi_surface->dc;
|
||||
bitmap.hbitmap = _bitmap;
|
||||
bitmap.prev_hbitmap = (HBITMAP)0;
|
||||
bitmap.cache = 0;
|
||||
bitmap.from_surface = 1;
|
||||
_bitmap = (HBITMAP)GetCurrentObject(gdi_surface->dc, OBJ_BITMAP);
|
||||
if (!_bitmap) {
|
||||
CANVAS_ERROR ("GetCurrentObject failed");
|
||||
}
|
||||
bitmap.dc = gdi_surface->dc;
|
||||
bitmap.hbitmap = _bitmap;
|
||||
bitmap.prev_hbitmap = (HBITMAP)0;
|
||||
bitmap.cache = 0;
|
||||
bitmap.from_surface = 1;
|
||||
} else {
|
||||
|
||||
if (!(surface = canvas_get_mask(&canvas->base, mask, NULL))) {
|
||||
@ -1149,10 +1149,10 @@ static void gdi_canvas_put_image(SpiceCanvas *spice_canvas, HDC dc, const SpiceR
|
||||
gdi_draw_bitmap_redrop(canvas->dc, &src, dest, dc,
|
||||
NULL, SPICE_ROPD_OP_PUT, 0);
|
||||
} else {
|
||||
pixman_image_t *image = pixman_image_create_bits(PIXMAN_a8r8g8b8, src_width, src_height,
|
||||
(uint32_t *)src_data, src_stride);
|
||||
pixman_image_t *image = pixman_image_create_bits(PIXMAN_a8r8g8b8, src_width, src_height,
|
||||
(uint32_t *)src_data, src_stride);
|
||||
gdi_draw_image(canvas->dc, &src, dest, image, NULL, SPICE_ROPD_OP_PUT, 0);
|
||||
pixman_image_unref(image);
|
||||
pixman_image_unref(image);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1244,7 +1244,7 @@ static void gdi_draw_bitmap_alpha(HDC dest_dc, const SpiceRect *src, const Spice
|
||||
}
|
||||
|
||||
static void gdi_draw_image_alpha(HDC dest_dc, const SpiceRect *src, const SpiceRect *dest,
|
||||
pixman_image_t *image, uint8_t alpha,
|
||||
pixman_image_t *image, uint8_t alpha,
|
||||
int rotate, int use_bitmap_alpha)
|
||||
{
|
||||
HDC dc;
|
||||
@ -1411,7 +1411,7 @@ static void gdi_canvas_draw_blend(SpiceCanvas *spice_canvas, SpiceRect *bbox, Sp
|
||||
ReleaseMutex(pixman_data->mutex);
|
||||
} else {
|
||||
gdi_draw_image(canvas->dc, &blend->src_area, bbox, surface,
|
||||
&bitmapmask, blend->rop_descriptor, 0);
|
||||
&bitmapmask, blend->rop_descriptor, 0);
|
||||
}
|
||||
|
||||
pixman_image_unref(surface);
|
||||
|
||||
@ -37,7 +37,7 @@ SpiceCanvas *gdi_canvas_create(int width, int height,
|
||||
HDC dc, class RecurciveMutex *lock, uint32_t format,
|
||||
SpiceImageCache *bits_cache,
|
||||
SpicePaletteCache *palette_cache,
|
||||
SpiceImageSurfaces *surfaces,
|
||||
SpiceImageSurfaces *surfaces,
|
||||
SpiceGlzDecoder *glz_decoder,
|
||||
SpiceJpegDecoder *jpeg_decoder,
|
||||
SpiceZlibDecoder *zlib_decoder);
|
||||
|
||||
@ -38,7 +38,7 @@ SpiceCanvas *gl_canvas_create(int width, int height, uint32_t format
|
||||
#elif defined(SW_CANVAS_IMAGE_CACHE)
|
||||
, SpiceImageCache *bits_cache
|
||||
#endif
|
||||
, SpiceImageSurfaces *surfaces
|
||||
, SpiceImageSurfaces *surfaces
|
||||
, SpiceGlzDecoder *glz_decoder
|
||||
, SpiceJpegDecoder *jpeg_decoder
|
||||
, SpiceZlibDecoder *zlib_decoder
|
||||
|
||||
@ -928,7 +928,7 @@ pixman_format_code_t spice_surface_format_to_pixman(uint32_t surface_format)
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
return (pixman_format_code_t)0; /* Not reached */
|
||||
return (pixman_format_code_t)0; /* Not reached */
|
||||
}
|
||||
|
||||
/* Returns the "spice native" pixman version of a specific bitmap format.
|
||||
|
||||
@ -472,8 +472,8 @@ static void __scale_image(SpiceCanvas *spice_canvas,
|
||||
|
||||
pixman_transform_init_scale(&transform, fsx, fsy);
|
||||
pixman_transform_translate(&transform, NULL,
|
||||
pixman_int_to_fixed (src_x),
|
||||
pixman_int_to_fixed (src_y));
|
||||
pixman_int_to_fixed (src_x),
|
||||
pixman_int_to_fixed (src_y));
|
||||
|
||||
pixman_image_set_transform(src, &transform);
|
||||
pixman_image_set_repeat(src, PIXMAN_REPEAT_NONE);
|
||||
@ -553,8 +553,8 @@ static void __scale_image_rop(SpiceCanvas *spice_canvas,
|
||||
|
||||
pixman_transform_init_scale(&transform, fsx, fsy);
|
||||
pixman_transform_translate(&transform, NULL,
|
||||
pixman_int_to_fixed (src_x),
|
||||
pixman_int_to_fixed (src_y));
|
||||
pixman_int_to_fixed (src_x),
|
||||
pixman_int_to_fixed (src_y));
|
||||
|
||||
pixman_image_set_transform(src, &transform);
|
||||
pixman_image_set_repeat(src, PIXMAN_REPEAT_NONE);
|
||||
@ -747,8 +747,8 @@ static void __blend_scale_image(SpiceCanvas *spice_canvas,
|
||||
|
||||
pixman_transform_init_scale(&transform, fsx, fsy);
|
||||
pixman_transform_translate(&transform, NULL,
|
||||
pixman_int_to_fixed (src_x),
|
||||
pixman_int_to_fixed (src_y));
|
||||
pixman_int_to_fixed (src_x),
|
||||
pixman_int_to_fixed (src_y));
|
||||
|
||||
mask = NULL;
|
||||
if (overall_alpha != 0xff) {
|
||||
@ -909,8 +909,8 @@ static void __colorkey_scale_image(SpiceCanvas *spice_canvas,
|
||||
|
||||
pixman_transform_init_scale(&transform, fsx, fsy);
|
||||
pixman_transform_translate(&transform, NULL,
|
||||
pixman_int_to_fixed (src_x),
|
||||
pixman_int_to_fixed (src_y));
|
||||
pixman_int_to_fixed (src_x),
|
||||
pixman_int_to_fixed (src_y));
|
||||
|
||||
pixman_image_set_transform(src, &transform);
|
||||
pixman_image_set_repeat(src, PIXMAN_REPEAT_NONE);
|
||||
|
||||
@ -41,7 +41,7 @@ SpiceCanvas *canvas_create(int width, int height, uint32_t format
|
||||
#elif defined(SW_CANVAS_IMAGE_CACHE)
|
||||
, SpiceImageCache *bits_cache
|
||||
#endif
|
||||
, SpiceImageSurfaces *surfaces
|
||||
, SpiceImageSurfaces *surfaces
|
||||
, SpiceGlzDecoder *glz_decoder
|
||||
, SpiceJpegDecoder *jpeg_decoder
|
||||
, SpiceZlibDecoder *zlib_decoder
|
||||
@ -54,7 +54,7 @@ SpiceCanvas *canvas_create_for_data(int width, int height, uint32_t format, uint
|
||||
#elif defined(SW_CANVAS_IMAGE_CACHE)
|
||||
, SpiceImageCache *bits_cache
|
||||
#endif
|
||||
, SpiceImageSurfaces *surfaces
|
||||
, SpiceImageSurfaces *surfaces
|
||||
, SpiceGlzDecoder *glz_decoder
|
||||
, SpiceJpegDecoder *jpeg_decoder
|
||||
, SpiceZlibDecoder *zlib_decoder
|
||||
|
||||
Loading…
Reference in New Issue
Block a user