typedef struct _GDI GDI;
FREERDP_API uint32 gdi_rop3_code(uint8 code);
-FREERDP_API void gdi_copy_mem(uint8 *d, uint8 *s, int n);
-FREERDP_API void gdi_copy_mem_backwards(uint8 *d, uint8 *s, int n);
FREERDP_API uint8* gdi_get_bitmap_pointer(HGDI_DC hdcBmp, int x, int y);
FREERDP_API uint8* gdi_get_brush_pointer(HGDI_DC hdcBrush, int x, int y);
FREERDP_API int gdi_is_mono_pixel_set(uint8* data, int x, int y, int width);
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
if (srcp != 0 && dstp != 0)
- {
- gdi_copy_mem(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
- }
+ memcpy(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
}
return 0;
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
if (srcp != 0 && dstp != 0)
- {
- gdi_copy_mem(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
- }
+ memmove(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
}
}
else if (nYSrc > nYDest || nXSrc > nXDest)
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
if (srcp != 0 && dstp != 0)
- {
- gdi_copy_mem(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
- }
+ memmove(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
}
}
else
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
if (srcp != 0 && dstp != 0)
- {
- gdi_copy_mem_backwards(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
- }
+ memmove(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
}
}
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
if (srcp != 0 && dstp != 0)
- {
- gdi_copy_mem(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
- }
+ memcpy(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
}
return 0;
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
if (srcp != 0 && dstp != 0)
- {
- gdi_copy_mem(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
- }
+ memmove(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
}
}
else if (nYSrc > nYDest || nXSrc > nXDest)
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
if (srcp != 0 && dstp != 0)
- {
- gdi_copy_mem(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
- }
+ memmove(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
}
}
else
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
if (srcp != 0 && dstp != 0)
- {
- gdi_copy_mem_backwards(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
- }
+ memmove(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
}
}
-
+
return 0;
}
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
if (srcp != 0 && dstp != 0)
- {
- gdi_copy_mem(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
- }
+ memcpy(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
}
return 0;
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
if (srcp != 0 && dstp != 0)
- {
- gdi_copy_mem(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
- }
+ memmove(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
}
}
else if (nYSrc > nYDest || nXSrc > nXDest)
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
if (srcp != 0 && dstp != 0)
- {
- gdi_copy_mem(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
- }
+ memmove(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
}
}
else
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
if (srcp != 0 && dstp != 0)
- {
- gdi_copy_mem_backwards(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
- }
+ memmove(dstp, srcp, nWidth * hdcDest->bytesPerPixel);
}
}
return rop3_code_table[code];
}
-INLINE void gdi_copy_mem(uint8 * d, uint8 * s, int n)
-{
- memmove(d, s, n);
-}
-
-INLINE void gdi_copy_mem_backwards(uint8 * d, uint8 * s, int n)
-{
- d = (d + n) - 1;
- s = (s + n) - 1;
-
- while (n & (~7))
- {
- *(d--) = *(s--);
- *(d--) = *(s--);
- *(d--) = *(s--);
- *(d--) = *(s--);
- *(d--) = *(s--);
- *(d--) = *(s--);
- *(d--) = *(s--);
- *(d--) = *(s--);
- n = n - 8;
- }
-
- while (n > 0)
- {
- *(d--) = *(s--);
- n--;
- }
-}
-
INLINE uint8* gdi_get_bitmap_pointer(HGDI_DC hdcBmp, int x, int y)
{
uint8 * p;