winex11: Implement X11DRV_FLUSH_GDI_DISPLAY ExtEscape command

Sebastian Lackner sebastian at fds-team.de
Tue Dec 31 09:18:53 CST 2013


Well, I cannot get rid completely of private escapes since the function
X11DRV_SET_DRAWABLE also is not available public, and I also don't know
any alternative to this command (is there any?). I know that the structs
for these private functions might change at any time, but thats a risk
where we also have not really any alternative choice (except adding
wrapper functions, but also not really a good solution).

Calling MsgWaitForMultipleObjects could help as a workaround for this
patch, but would be a relatively large overhead: wineserver calls,
listening for input events, ... - even though in windowless mode the
plugin doesn't have any window, but just an hDC to draw on. The
functions are called for every video frame, thats why I want to keep the
overhead as small as possible.

Do you think it would be better to expose those functions
(X11DRV_SET_DRAWABLE, X11DRV_FLUSH_GDI_DISPLAY) somehow else? I can live
with the risk that the interface might change in the future ;-)

Sebastian

Am 31.12.2013 12:33, schrieb Alexandre Julliard:
> Sebastian Lackner <sebastian at fds-team.de> writes:
> 
>> This patch implements an additional ExtEscape command
>> X11DRV_FLUSH_GDI_DISPLAY, which can be used by external applications in
>> order to flush all drawing operations to the Xserver.
>>
>> This patch is necessary for a new feature of Pipelight: In NPAPI
>> windowlessmode the browser provides an X11 drawable, and expects the
>> plugin (= the wine application) to draw on it. The current
>> implementation uses CreateDCA() to create a new hDC and then
>> X11DRV_SET_DRAWABLE to draw on an arbitrary X11 drawable. The additional
>> command implemented in this patch is required to ensure that the drawing
>> is finished before the PAINT event returns. Normally an XSync would be
>> even better, but a lot of testing shows that XFlush is also sufficient
>> (and faster), thats why we decided to use this approach.
> 
> You should call MsgWaitForMultipleObjects or some similar function
> instead of adding private escapes.
> 




More information about the wine-devel mailing list