mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-12-04 15:23:32 +08:00
xfreerdp: make use of --gdi hw by default
This commit is contained in:
parent
1e4d6df998
commit
8c4a8d982f
@ -548,8 +548,10 @@ void xf_gdi_line_to(rdpUpdate* update, LINE_TO_ORDER* line_to)
|
||||
void xf_gdi_polyline(rdpUpdate* update, POLYLINE_ORDER* polyline)
|
||||
{
|
||||
int i;
|
||||
int x, y;
|
||||
uint32 color;
|
||||
XPoint* points;
|
||||
int width, height;
|
||||
xfInfo* xfi = GET_XFI(update);
|
||||
|
||||
xf_set_rop2(xfi, polyline->bRop2);
|
||||
@ -564,6 +566,34 @@ void xf_gdi_polyline(rdpUpdate* update, POLYLINE_ORDER* polyline)
|
||||
{
|
||||
points[i].x = polyline->points[i].x;
|
||||
points[i].y = polyline->points[i].y;
|
||||
|
||||
if (i > 0)
|
||||
{
|
||||
width = points[i].x - points[i - 1].x;
|
||||
height = points[i].y - points[i - 1].y;
|
||||
|
||||
if (width < 0)
|
||||
{
|
||||
width *= (-1);
|
||||
x = points[i].x;
|
||||
}
|
||||
else
|
||||
{
|
||||
x = points[i - 1].x;
|
||||
}
|
||||
|
||||
if (height < 0)
|
||||
{
|
||||
height *= (-1);
|
||||
y = points[i].y;
|
||||
}
|
||||
else
|
||||
{
|
||||
y = points[i - 1].y;
|
||||
}
|
||||
|
||||
gdi_InvalidateRegion(xfi->hdc, x, y, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
XDrawLines(xfi->display, xfi->drawing, xfi->gc, points, polyline->numPoints, CoordModePrevious);
|
||||
@ -988,7 +1018,7 @@ void xf_gdi_register_update_callbacks(rdpUpdate* update)
|
||||
update->MultiOpaqueRect = xf_gdi_multi_opaque_rect;
|
||||
update->MultiDrawNineGrid = NULL;
|
||||
update->LineTo = xf_gdi_line_to;
|
||||
update->Polyline = NULL;
|
||||
update->Polyline = xf_gdi_polyline;
|
||||
update->MemBlt = xf_gdi_memblt;
|
||||
update->Mem3Blt = xf_gdi_mem3blt;
|
||||
update->SaveBitmap = NULL;
|
||||
|
@ -629,7 +629,6 @@ boolean xf_post_connect(freerdp* instance)
|
||||
|
||||
xfi->bitmap_mono = XCreatePixmap(xfi->display, xfi->drawable, 8, 8, 1);
|
||||
xfi->gc_mono = XCreateGC(xfi->display, xfi->bitmap_mono, GCGraphicsExposures, &gcv);
|
||||
xfi->gc_default = XCreateGC(xfi->display, xfi->drawable, GCGraphicsExposures, &gcv);
|
||||
|
||||
XSetForeground(xfi->display, xfi->gc, BlackPixelOfScreen(xfi->screen));
|
||||
XFillRectangle(xfi->display, xfi->primary, xfi->gc, 0, 0, xfi->width, xfi->height);
|
||||
@ -958,7 +957,7 @@ int main(int argc, char* argv[])
|
||||
chanman = freerdp_chanman_new();
|
||||
SET_CHANMAN(instance, chanman);
|
||||
|
||||
instance->settings->sw_gdi = True;
|
||||
instance->settings->sw_gdi = False;
|
||||
|
||||
if (freerdp_parse_args(instance->settings, argc, argv,
|
||||
xf_process_plugin_args, chanman, xf_process_ui_args, NULL) < 0)
|
||||
|
@ -60,7 +60,6 @@ struct xf_info
|
||||
int height;
|
||||
int srcBpp;
|
||||
GC gc_mono;
|
||||
GC gc_default;
|
||||
Screen* screen;
|
||||
XImage* image;
|
||||
Pixmap primary;
|
||||
@ -142,5 +141,4 @@ boolean xf_post_connect(freerdp* instance);
|
||||
#define DEBUG_X11_LMS(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__)
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __XFREERDP_H */
|
||||
|
Loading…
Reference in New Issue
Block a user