Commit Graph

112 Commits

Author SHA1 Message Date
Norbert Federa ceb015a6bb egfx: the gfx reset grahics pdu is optional
Since the EGFX Reset Graphics PDU seems to be optional,
the graphicsReset variable (which is updated in that PDU's handler)
should be removed from the rdp_gdi struct with the next change
in public headers (as in freerdp v3).
There are still some clients that expect and check it and therefore
we keep it for now, initialized with TRUE.

sdas
2020-02-26 13:57:12 +01:00
Armin Novak 72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
asapelkin 82eadad4a4 Fix some static analizer warnings 2019-10-22 15:39:54 +02:00
Armin Novak d7ca2db62e Fixed doulbe semicolon in C files. 2019-05-08 12:58:01 +02:00
Armin Novak 3d1cec894c Fixed alignment requirements for surface sizes. 2019-05-08 10:36:00 +02:00
Armin Novak 3b7e46fb0e Updated GFX to 10.6 spec 2019-05-07 12:10:13 +02:00
Armin Novak 0c13c3199e Follow up to #4959: Lock gdi_UpdateSurfaces like xf_UpdateSurfaces 2018-12-04 16:56:22 +01:00
Armin Novak 2e019b2fd1 Implemented GFX locking and enforce return value checks.
To fix #4825 GFX functions must now aquire a lock before accessing surfaces.
This prevents simultaneous update of internal data by client and gfx threads.
Also enforce return value checks, where not already done.
2018-11-29 11:55:27 +01:00
Bernhard Miklautz c0afb8bd6b
Merge pull request #4322 from akallabeth/rail_fixes
Rail fixes for GFX mode
2018-04-11 10:49:44 +02:00
Armin Novak 62607e3b02 Fixed accidental free of XImage data. 2018-02-12 12:44:51 +01:00
Armin Novak 7c0a33632b Fixed #4412: XImage must be freed with XDestroyImage 2018-02-12 10:02:35 +01:00
Armin Novak ed9d86b1a3 Fixed GFX output expose. 2018-02-08 13:55:36 +01:00
Armin Novak c0ec81c3c7 Do not update client if output suppressed. 2018-02-08 11:59:00 +01:00
Armin Novak 253beda330 Fixed formatting. 2018-02-08 11:55:57 +01:00
Armin Novak ac1d6e8153 Fixed #3676, #4269: Screen update for RAIL with GFX 2018-01-08 13:21:02 +01:00
Ondrej Holy 3137caebf2 Fix colors on big endian (#4135)
* client/x11: Fix colors on big endian

The bitmaps are recieved in little endian byte order (LSBFirst in terms
of X11). This is a problem on systems, where bitmaps are expected in big
endian byte order (MSBFirst). X11 client tries to handle this situation
by different color formats (e.g. RGBX vs. BGRX), but this doesn't work.
BGRX is not MSBFirst variant of RGBX, it should be XRGB. But this would
work only for 32/24 depths, where color channels matches bytes. Let's
say to the XServer that all the bitmaps are in LSBFirst encoding instead
of changing the color formats on big endian systems.

https://github.com/FreeRDP/FreeRDP/issues/2520

* client/x11: Fix cursor color on big endian

The cursor color is wrong on big endian systems. It is not probably
possible to force bitmap_order for XcursorImage as it is possible for
XImage. Fortunately, cursors are always 32 bit so we can use ABGR
instead of BGRA to deal with.

https://github.com/FreeRDP/FreeRDP/issues/2520

* client/x11: Fix comment indentation

The comment has wrong indentation for some reason, let's fix it.

* client/x11: Fix BGR vs. RGB detection

The BGR vs. RGB detection code is leftover from history and I am conviced
that it is wrong with the current color handling, where invert flag is TRUE
by default. However, I suppose that the detection still makes sense and
XServer may use the inverted formats in some cases. Maybe we can force XServer
to use our masks somehow, but let's just fix the value to FALSE now.

* client/x11: Remove unused color shifts

The color shifts are lefover from history and are not used in current
code. Let's remove them.
2017-09-18 10:47:56 +02:00
Jiang, Zihao 790c48017c Client/X11: Fix h264 context leak when DeleteSurface (#4089) 2017-08-14 10:16:14 +02:00
Norbert Federa 36b8f54c5e Fixed a few compiler warnings 2017-07-10 17:52:05 +02:00
David Fort d170c10ee6 Fix H264 in multi monitor case
The H264 context is surface specific, so in multi-monitor (with multiple surfaces)
the decoding was failing. This patch fixes that by introducing a surface specific
h264 context.
2017-05-02 18:39:33 +02:00
Norbert Federa 263348ff2b client/x11: fix gfx drawing bug with /multimon
The surface's damage region is not relative to the output but
lives in its own universe starting at origin 0,0.

Also fixed the drawing coordinates used in the XRENDER code path
which is used with /smart-sizing
2017-04-11 12:30:37 +02:00
Armin Novak 850d7fbc38 Update changed rectangles instead of extent. 2017-03-30 18:17:21 +02:00
Armin Novak 73bf4547a5 X11 GFX: Restrict to region, ignore alpha
* Restrict the screen update to the changed region
* Ignore differences in color format alpha
2017-03-28 12:14:19 +02:00
Armin Novak 03abaf1aee Align scanline to multiple of 16, required for ASM 2017-02-15 12:08:32 +01:00
Armin Novak 6ceb574402 Fixed staging surface scanline. 2017-01-23 11:32:25 +01:00
Armin Novak d4b823d5cb Using a single codec context per session. 2016-12-07 13:22:00 +01:00
Armin Novak 3c25ffb38c Unified scanline padding function. 2016-11-24 09:02:06 +01:00
Armin Novak 61a1c8ccc5 Fixed broken scanline alignment. 2016-11-23 12:54:20 +01:00
Armin Novak f62d00445e Fixed surface alignment. 2016-10-28 11:54:34 +02:00
Armin Novak 9c50e1a635 Replaced _VF formats with copy flags. 2016-10-14 10:36:52 +02:00
Armin Novak 70f3d43975 Removed broken return check. 2016-10-06 13:43:15 +02:00
Armin Novak c8a7065f93 Refactored xfContext. 2016-10-06 13:43:06 +02:00
Armin Novak 8fffda5740 Fixed clearcodec and codecs reset. 2016-10-06 13:43:01 +02:00
Armin Novak a6cef5cde7 Fixed GFX related issues. 2016-10-06 13:43:00 +02:00
Armin Novak df35c135d1 Fixed color conversion, unified GFX and updated API. 2016-10-06 13:42:58 +02:00
zihao.jiang e7d9e91864 channels/rdpgfx: Make freerdp_client_codecs_prepare calls codec reset. It fix broken h264 client from #3328. Also it doesn't make sense that we don't need width and height for codec initialization while we need them for codec reset 2016-05-30 02:00:05 +08:00
Armin Novak 5bc333c626 Implemented GFX AVC444 support. 2016-03-16 13:43:18 +01:00
Armin Novak 3a3ec85898 Unified RDPGFX_RECT16 and RECTANGLE_16 2016-03-16 13:43:17 +01:00
Armin Novak 8997c6c03a Added log messages for unsupported surface commands. 2016-03-02 14:46:33 +01:00
Armin Novak 2e110c7f35 Fixed codec reset, now resetting resolution too.
H264 and others require the surface resolution to work properly.
This initializes the codecs and the resolution on reset.
2016-03-02 14:46:33 +01:00
Armin Novak e7c8ea4db9 Fixed memory leak. 2016-01-15 09:33:21 +01:00
Marc-André Moreau 029cbf3aca libfreerdp-gdi: fix egfx multimon support 2015-10-13 15:50:39 -04:00
Marc-André Moreau 4ab373aced xfreerdp: fix multiple egfx context support in X11 GFX 2015-10-13 14:49:30 -04:00
Armin Novak 551eca246b Ignoring H264 decompression failures.
When connecting to windows 8.1 machines the remote RDP server
implementation sometimes sends invalid H264 data. To avoid client
disconnections ignore the broken updates.
2015-09-03 12:11:15 +02:00
Martin Haimberger 52405a3e79 Remove WIN32ERROR type
All return values are UINT now.
2015-08-27 05:38:20 -07:00
Martin Haimberger 420a86e1c7 Merge remote-tracking branch 'upstream/master' into mh-channel-fix
Conflicts:
	channels/drdynvc/client/drdynvc_main.c
	channels/rdpgfx/client/rdpgfx_main.c
	client/X11/xf_gfx.c
2015-08-25 00:07:04 -07:00
Marc-André Moreau 5cb06ecc68 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2015-07-28 09:21:33 -04:00
Martin Haimberger 6ab0187d84 Merge remote-tracking branch 'upstream/master' into mh-channel
Conflicts:
	channels/audin/client/oss/audin_oss.c
	channels/drive/client/drive_main.c
	channels/printer/client/printer_cups.c
	channels/printer/client/printer_main.c
	channels/rail/client/rail_main.c
	channels/rdpgfx/client/rdpgfx_main.c
	channels/rdpsnd/client/oss/rdpsnd_oss.c
	channels/remdesk/client/remdesk_main.c
	channels/remdesk/server/remdesk_main.c
	channels/tsmf/client/tsmf_media.c
2015-07-15 01:57:07 -07:00
Marc-André Moreau 3781e803ed channels/rdpgfx: improve frame ack handling 2015-07-06 16:28:52 -04:00
ilammy 1012bccdaa client/x11: do not discard events when updating EGFX surface mapping
Passing True to XSync() discards any pending X11 events. Occasionally
this caused ButtonRelease or KeyRelease to be lost and not forwarded
to the remote computed, leading to stuck keys and buttons.

This should resolve issue #2391
2015-06-30 12:48:08 +03:00
Martin Haimberger dc68bdfce5 channel rdpgfx hardend 2015-06-18 03:04:32 -07:00