mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-01-09 05:34:12 +00:00
canvas: Remove unused dc parameter from surface_create
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
00d1cda4ce
commit
6ce1a61577
@ -418,11 +418,7 @@ static pixman_image_t *canvas_get_quic(CanvasBase *canvas, SpiceImage *image,
|
||||
spice_return_val_if_fail((uint32_t)width == image->descriptor.width, NULL);
|
||||
spice_return_val_if_fail((uint32_t)height == image->descriptor.height, NULL);
|
||||
|
||||
surface = surface_create(
|
||||
#ifdef WIN32
|
||||
canvas->dc,
|
||||
#endif
|
||||
pixman_format,
|
||||
surface = surface_create(pixman_format,
|
||||
width, height, FALSE);
|
||||
|
||||
spice_return_val_if_fail(surface != NULL, NULL);
|
||||
@ -481,11 +477,7 @@ static pixman_image_t *canvas_get_jpeg(CanvasBase *canvas, SpiceImage *image)
|
||||
spice_return_val_if_fail((uint32_t)width == image->descriptor.width, NULL);
|
||||
spice_return_val_if_fail((uint32_t)height == image->descriptor.height, NULL);
|
||||
|
||||
surface = surface_create(
|
||||
#ifdef WIN32
|
||||
canvas->dc,
|
||||
#endif
|
||||
PIXMAN_LE_x8r8g8b8,
|
||||
surface = surface_create(PIXMAN_LE_x8r8g8b8,
|
||||
width, height, FALSE);
|
||||
if (surface == NULL) {
|
||||
spice_warning("create surface failed");
|
||||
@ -563,11 +555,7 @@ static pixman_image_t *canvas_get_lz4(CanvasBase *canvas, SpiceImage *image)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
surface = surface_create(
|
||||
#ifdef WIN32
|
||||
canvas->dc,
|
||||
#endif
|
||||
format,
|
||||
surface = surface_create(format,
|
||||
width, height, top_down);
|
||||
if (surface == NULL) {
|
||||
spice_warning("create surface failed");
|
||||
@ -694,11 +682,7 @@ static pixman_image_t *canvas_bitmap_to_surface(CanvasBase *canvas, SpiceBitmap*
|
||||
bitmap->format == SPICE_BITMAP_FMT_RGBA);
|
||||
}
|
||||
|
||||
image = surface_create(
|
||||
#ifdef WIN32
|
||||
canvas->dc,
|
||||
#endif
|
||||
format,
|
||||
image = surface_create(format,
|
||||
bitmap->x, bitmap->y, FALSE);
|
||||
if (image == NULL) {
|
||||
spice_warning("create surface failed");
|
||||
@ -1262,11 +1246,7 @@ static pixman_image_t *canvas_get_image_internal(CanvasBase *canvas, SpiceImage
|
||||
surface_format == PIXMAN_a8r8g8b8);
|
||||
|
||||
if (surface_format != wanted_format) {
|
||||
converted = surface_create(
|
||||
#ifdef WIN32
|
||||
canvas->dc,
|
||||
#endif
|
||||
wanted_format,
|
||||
converted = surface_create(wanted_format,
|
||||
pixman_image_get_width(surface),
|
||||
pixman_image_get_height(surface),
|
||||
TRUE);
|
||||
@ -1411,11 +1391,7 @@ static pixman_image_t *canvas_get_bitmap_mask(CanvasBase *canvas, SpiceBitmap* b
|
||||
int line_size;
|
||||
int dest_stride;
|
||||
|
||||
surface = surface_create(
|
||||
#ifdef WIN32
|
||||
canvas->dc,
|
||||
#endif
|
||||
PIXMAN_a1, bitmap->x, bitmap->y, TRUE);
|
||||
surface = surface_create(PIXMAN_a1, bitmap->x, bitmap->y, TRUE);
|
||||
spice_return_val_if_fail(surface != NULL, NULL);
|
||||
|
||||
spice_chunks_linearize(bitmap->data);
|
||||
|
||||
@ -114,12 +114,7 @@ static inline pixman_image_t *__surface_create_stride(pixman_format_code_t forma
|
||||
return surface;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
pixman_image_t *surface_create(HDC dc, pixman_format_code_t format,
|
||||
int width, int height, int top_down)
|
||||
#else
|
||||
pixman_image_t * surface_create(pixman_format_code_t format, int width, int height, int top_down)
|
||||
#endif
|
||||
{
|
||||
if (top_down) {
|
||||
pixman_image_t *surface;
|
||||
@ -177,7 +172,7 @@ pixman_image_t *surface_create_stride(pixman_format_code_t format, int width, in
|
||||
#ifdef WIN32
|
||||
if (dc) {
|
||||
if (abs(stride) == (width * 4)) {
|
||||
return surface_create(dc, format, width, height, (stride > 0));
|
||||
return surface_create(format, width, height, (stride > 0));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -36,12 +36,7 @@ void spice_pixman_image_set_format(pixman_image_t *image,
|
||||
int spice_pixman_image_get_format(pixman_image_t *image, pixman_format_code_t *format);
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
pixman_image_t *surface_create(HDC dc, pixman_format_code_t format,
|
||||
int width, int height, int top_down);
|
||||
#else
|
||||
pixman_image_t *surface_create(pixman_format_code_t format, int width, int height, int top_down);
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
pixman_image_t *surface_create_stride(HDC dc, pixman_format_code_t format, int width, int height,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user