Fixed hardware GDI.
authorArmin Novak <armin.novak@thincast.com>
Thu, 21 Jul 2016 11:00:57 +0000 (13:00 +0200)
committerArmin Novak <armin.novak@thincast.com>
Thu, 6 Oct 2016 11:43:04 +0000 (13:43 +0200)
client/X11/xf_client.c
client/X11/xf_gdi.c

index c2733b3..293e689 100644 (file)
@@ -1104,18 +1104,15 @@ static BOOL xf_pre_connect(freerdp* instance)
        settings->OrderSupport[NEG_LINETO_INDEX] = TRUE;
        settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE;
        settings->OrderSupport[NEG_MEMBLT_INDEX] = settings->BitmapCacheEnabled;
-       settings->OrderSupport[NEG_MEM3BLT_INDEX] = (settings->SoftwareGdi) ? TRUE :
-       FALSE;
+       settings->OrderSupport[NEG_MEM3BLT_INDEX] = TRUE;
        settings->OrderSupport[NEG_MEMBLT_V2_INDEX] = settings->BitmapCacheEnabled;
        settings->OrderSupport[NEG_MEM3BLT_V2_INDEX] = FALSE;
        settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = FALSE;
        settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = TRUE;
        settings->OrderSupport[NEG_FAST_INDEX_INDEX] = TRUE;
        settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = TRUE;
-       settings->OrderSupport[NEG_POLYGON_SC_INDEX] = (settings->SoftwareGdi) ? FALSE :
-       TRUE;
-       settings->OrderSupport[NEG_POLYGON_CB_INDEX] = (settings->SoftwareGdi) ? FALSE :
-       TRUE;
+       settings->OrderSupport[NEG_POLYGON_SC_INDEX] = TRUE;
+       settings->OrderSupport[NEG_POLYGON_CB_INDEX] = TRUE;
        settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE;
        settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE;
        PubSub_SubscribeChannelConnected(instance->context->pubSub,
@@ -1222,6 +1219,11 @@ static BOOL xf_post_connect(freerdp* instance)
                }
 
                xf_gdi_register_update_callbacks(update);
+               brush_cache_register_callbacks(instance->update);
+               glyph_cache_register_callbacks(instance->update);
+               bitmap_cache_register_callbacks(instance->update);
+               offscreen_cache_register_callbacks(instance->update);
+               palette_cache_register_callbacks(instance->update);
        }
 
 #ifdef WITH_XRENDER
index 1f86f45..a1dc606 100644 (file)
@@ -612,11 +612,17 @@ static BOOL xf_gdi_polyline(rdpContext* context,
 
 static BOOL xf_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt)
 {
-       xfBitmap* bitmap = (xfBitmap*) memblt->bitmap;
-       xfContext* xfc = (xfContext*) context;
+       xfBitmap* bitmap;
+       xfContext* xfc;
        BOOL ret = TRUE;
 
-       if (!xfc->display || !xfc->drawing)
+       if (!context || !memblt)
+               return FALSE;
+
+       bitmap = (xfBitmap*) memblt->bitmap;
+       xfc = (xfContext*) context;
+
+       if (!bitmap || !xfc || !xfc->display || !xfc->drawing)
                return FALSE;
 
        xf_lock_x11(xfc, FALSE);