From 8b1ad6a6cd7455a840e90c06cf55084bbe8672bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Thu, 25 Sep 2014 10:39:23 -0400 Subject: [PATCH] libfreerdp-gdi: remove some dead code --- include/freerdp/gdi/gdi.h | 1 - libfreerdp/gdi/gdi.c | 48 --------------------------------------- 2 files changed, 49 deletions(-) diff --git a/include/freerdp/gdi/gdi.h b/include/freerdp/gdi/gdi.h index 6f1b60fb8..b1450cdfa 100644 --- a/include/freerdp/gdi/gdi.h +++ b/include/freerdp/gdi/gdi.h @@ -313,7 +313,6 @@ FREERDP_API UINT32 gdi_rop3_code(BYTE code); FREERDP_API UINT32 gdi_get_pixel_format(UINT32 bitsPerPixel, BOOL vFlip); FREERDP_API BYTE* gdi_get_bitmap_pointer(HGDI_DC hdcBmp, int x, int y); FREERDP_API BYTE* gdi_get_brush_pointer(HGDI_DC hdcBrush, int x, int y); -FREERDP_API int gdi_is_mono_pixel_set(BYTE* data, int x, int y, int width); FREERDP_API void gdi_resize(rdpGdi* gdi, int width, int height); FREERDP_API int gdi_init(freerdp* instance, UINT32 flags, BYTE* buffer); diff --git a/libfreerdp/gdi/gdi.c b/libfreerdp/gdi/gdi.c index 83ba65408..72720daf1 100644 --- a/libfreerdp/gdi/gdi.c +++ b/libfreerdp/gdi/gdi.c @@ -405,54 +405,6 @@ INLINE BYTE* gdi_get_brush_pointer(HGDI_DC hdcBrush, int x, int y) return p; } -INLINE int gdi_is_mono_pixel_set(BYTE* data, int x, int y, int width) -{ - int byte; - int shift; - - width = (width + 7) / 8; - byte = (y * width) + (x / 8); - shift = x % 8; - - return (data[byte] & (0x80 >> shift)) != 0; -} - -static gdiBitmap* gdi_glyph_new(rdpGdi* gdi, GLYPH_DATA* glyph) -{ - BYTE* extra; - gdiBitmap* gdi_bmp; - - gdi_bmp = (gdiBitmap*) malloc(sizeof(gdiBitmap)); - - if (!gdi_bmp) - return NULL; - - gdi_bmp->hdc = gdi_GetDC(); - gdi_bmp->hdc->bytesPerPixel = 1; - gdi_bmp->hdc->bitsPerPixel = 1; - - extra = freerdp_glyph_convert(glyph->cx, glyph->cy, glyph->aj); - gdi_bmp->bitmap = gdi_CreateBitmap(glyph->cx, glyph->cy, 1, extra); - gdi_bmp->bitmap->bytesPerPixel = 1; - gdi_bmp->bitmap->bitsPerPixel = 1; - - gdi_SelectObject(gdi_bmp->hdc, (HGDIOBJECT) gdi_bmp->bitmap); - gdi_bmp->org_bitmap = NULL; - - return gdi_bmp; -} - -static void gdi_glyph_free(gdiBitmap* gdi_bmp) -{ - if (gdi_bmp) - { - gdi_SelectObject(gdi_bmp->hdc, (HGDIOBJECT) gdi_bmp->org_bitmap); - gdi_DeleteObject((HGDIOBJECT) gdi_bmp->bitmap); - gdi_DeleteDC(gdi_bmp->hdc); - free(gdi_bmp); - } -} - gdiBitmap* gdi_bitmap_new_ex(rdpGdi* gdi, int width, int height, int bpp, BYTE* data) { gdiBitmap* bitmap;