<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 20 Mar 2017, at 17:37, Christophe de Dinechin <<a href="mailto:cdupontd@redhat.com" class="">cdupontd@redhat.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="">Side note: the .gitattribute in that project seems all wrong. It makes source files a pain to edit under Linux or macOS. Why not mark the source files as text? </div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class=""><blockquote type="cite" class=""><div class="">On 20 Mar 2017, at 13:08, Frediano Ziglio <<a href="mailto:fziglio@redhat.com" class="">fziglio@redhat.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="">Instead of sending drawable commands down from presentation<br class="">callback, collect drawables objects and pass them to dedicated<br class="">thread for processing. This reduce peak load of presentation<br class="">callback.<br class=""><br class="">Signed-off-by: Javier Celaya <<a href="mailto:javier.celaya@flexvdi.com" class="">javier.celaya@flexvdi.com</a>><br class="">Signed-off-by: Yuri Benditovich <<a href="mailto:yuri.benditovich@daynix.com" class="">yuri.benditovich@daynix.com</a>><br class="">---<br class="">qxldod/QxlDod.cpp | 43 +++++++++++++++++++++++++++++++++----------<br class="">qxldod/QxlDod.h | 4 ++--<br class="">2 files changed, 35 insertions(+), 12 deletions(-)<br class=""><br class="">diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp<br class="">index b952bf9..01de9b3 100755<br class="">--- a/qxldod/QxlDod.cpp<br class="">+++ b/qxldod/QxlDod.cpp<br class="">@@ -3794,11 +3794,20 @@ QxlDevice::ExecutePresentDisplayOnly(<br class=""> SIZE_T sizeRects = NumDirtyRects*sizeof(RECT);<br class=""> SIZE_T size = sizeof(DoPresentMemory) + sizeMoves + sizeRects;<br class=""><br class="">+ QXLDrawable **pDrawables = reinterpret_cast<QXLDrawable **>(new<br class="">(NonPagedPoolNx) BYTE[sizeof(QXLDrawable *)*(NumDirtyRects + NumMoves +<br class="">1)]);<br class=""></blockquote><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">here would be</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;"> QXLDrawable **pDrawables = new (NonPagedPoolNx) QXLDrawable *[NumDirtyRects + NumMoves + 1];</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">is non paged memory needed? Both functions (producer and consumer) are in paged areas.</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">+ UINT nIndex = 0;<br class="">+<br class="">+ if (!pDrawables)<br class="">+ {<br class="">+ return STATUS_NO_MEMORY;<br class="">+ }<br class="">+<br class=""> DoPresentMemory* ctx = reinterpret_cast<DoPresentMemory*><br class=""> (new (NonPagedPoolNx) BYTE[size]);<br class=""><br class=""></blockquote><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;"> DoPresentMemory* ctx = new (NonPagedPoolNx) DoPresentMemory;</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"></div></div></blockquote><div class=""><br class=""></div><div class="">That would be nicer, but apparently, there is extra stuff padded to it:</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><div class=""><blockquote type="cite" class=""> SIZE_T size = sizeof(DoPresentMemory) + sizeMoves + sizeRects;<br class=""><br class=""></blockquote></div></blockquote></blockquote></div><div class=""><br class=""></div><div class="">Also, this part of the code was not changed. It was like this before. But is it necessary ? It’s really borderline with respect to alignment. In one case, we have BYTE-aligned memory, in the other it’s at least sizeof(void *).</div><div class=""><br class=""></div><div class="">You could use placement new. Assuming non-paged pool:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>BYTE *storage = new(NonPagedPoolNx) BYTE[size];</div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>DoPresentMemory *ctx = new(storage) DoPresentMemory;</div><div class=""><br class=""></div><div class="">There’s no constructor, apparently. So it does not make much of a difference.</div><div class=""><br class=""></div><blockquote type="cite" class=""><div class=""><div class=""><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">same comments as above</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"> if (!ctx)<br class=""> {<br class="">+ delete[] reinterpret_cast<BYTE*>(pDrawables);<br class=""></blockquote><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">delete[] pDrawables;</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"> return STATUS_NO_MEMORY;<br class=""> }<br class=""><br class="">@@ -3828,6 +3837,8 @@ QxlDevice::ExecutePresentDisplayOnly(<br class=""> PMDL mdl = IoAllocateMdl((PVOID)SrcAddr, sizeToMap, FALSE, FALSE,<br class=""> NULL);<br class=""> if(!mdl)<br class=""> {<br class="">+ delete[] reinterpret_cast<BYTE*>(ctx);<br class=""></blockquote></div></div></blockquote><div class=""><br class=""></div><div class=""><div class="">There were several leaks of ctx in case of failure before. I suggest a separate patch to fix that. There are many other places where the current patch does not fix them, for instance VgaDevice::GetModeList can leak m_ModeInfo if m_ModeNumbers can’t be allocated.</div></div></div></div></div></div></blockquote><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I’m probably wrong on this. They are freed in the destructor, and freed before you can overwrite them. But for local variables like ctx, there are leaks.</div><div class=""><br class=""></div><div class="">Christophe</div><br class=""><blockquote type="cite" class=""><div class=""><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><div class=""><div class=""><div class=""><br class=""></div></div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">+ delete[] reinterpret_cast<BYTE*>(pDrawables);<br class=""></blockquote><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">similar to above, in this case "delete ctx;”</span></div></div></blockquote><div class=""><br class=""></div>There is a risk if, indeed, we store more than an object in it. delete[] and delete are implemented differently by some runtimes (I don’t recall about the Win driver runtime). It is not guaranteed that delete ctx would work reliably if we allocated more than sizeof(DoPresentMemory) bytes. Being able to deal with variable size is the very reason for delete[].</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class=""><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"> return STATUS_INSUFFICIENT_RESOURCES;<br class=""> }<br class=""><br class="">@@ -3844,6 +3855,8 @@ QxlDevice::ExecutePresentDisplayOnly(<br class=""> {<br class=""> Status = GetExceptionCode();<br class=""> IoFreeMdl(mdl);<br class="">+ delete[] reinterpret_cast<BYTE*>(ctx);<br class="">+ delete[] reinterpret_cast<BYTE*>(pDrawables);</blockquote></div></blockquote></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class=""><div class=""><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">ditto</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"> return Status;<br class=""> }<br class=""><br class="">@@ -3857,6 +3870,8 @@ QxlDevice::ExecutePresentDisplayOnly(<br class=""> Status = STATUS_INSUFFICIENT_RESOURCES;<br class=""> MmUnlockPages(mdl);<br class=""> IoFreeMdl(mdl);<br class="">+ delete[] reinterpret_cast<BYTE*>(ctx);<br class="">+ delete[] reinterpret_cast<BYTE*>(pDrawables);<br class=""></blockquote><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">ditto</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"></div></div></blockquote><div class=""><br class=""></div><div class=""><br class=""></div><blockquote type="cite" class=""><div class=""><div class=""><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"> return Status;<br class=""> }<br class=""><br class="">@@ -3922,7 +3937,9 @@ QxlDevice::ExecutePresentDisplayOnly(<br class=""> DbgPrint(TRACE_LEVEL_INFORMATION, ("--- %d SourcePoint.x = %ld,<br class=""> SourcePoint.y = %ld, DestRect.bottom = %ld, DestRect.left = %ld,<br class=""> DestRect.right = %ld, DestRect.top = %ld\n",<br class=""> i , pSourcePoint->x, pSourcePoint->y, pDestRect->bottom,<br class=""> pDestRect->left, pDestRect->right, pDestRect->top));<br class=""><br class="">- CopyBits(*pDestRect, *pSourcePoint);<br class="">+ pDrawables[nIndex] = CopyBits(*pDestRect, *pSourcePoint);<br class="">+<br class="">+ if (pDrawables[nIndex]) nIndex++;<br class=""> }<br class=""><br class=""> // Copy all the dirty rects from source image to video frame buffer.<br class="">@@ -3936,11 +3953,13 @@ QxlDevice::ExecutePresentDisplayOnly(<br class=""> DbgPrint(TRACE_LEVEL_INFORMATION, ("--- %d pDirtyRect->bottom = %ld,<br class=""> pDirtyRect->left = %ld, pDirtyRect->right = %ld, pDirtyRect->top =<br class=""> %ld\n",<br class=""> i, pDirtyRect->bottom, pDirtyRect->left, pDirtyRect->right,<br class=""> pDirtyRect->top));<br class=""><br class="">- BltBits(&DstBltInfo,<br class="">+ pDrawables[nIndex] = BltBits(&DstBltInfo,<br class=""> &SrcBltInfo,<br class=""> 1,<br class=""> pDirtyRect,<br class=""> &sourcePoint);<br class="">+<br class="">+ if (pDrawables[nIndex]) nIndex++;<br class=""> }<br class=""><br class=""> // Unmap unmap and unlock the pages.<br class="">@@ -3951,6 +3970,10 @@ QxlDevice::ExecutePresentDisplayOnly(<br class=""> }<br class=""> delete [] reinterpret_cast<BYTE*>(ctx);<br class=""><br class="">+ pDrawables[nIndex] = NULL;<br class="">+<br class="">+ PostToWorkerThread(pDrawables);<br class="">+<br class=""> return STATUS_SUCCESS;<br class="">}<br class=""><br class="">@@ -4364,7 +4387,7 @@ VOID QxlDevice::SetImageId(InternalImage *internal,<br class=""> }<br class="">}<br class=""><br class="">-void QxlDevice::CopyBits(const RECT& rect, const POINT& sourcePoint)<br class="">+QXLDrawable *QxlDevice::CopyBits(const RECT& rect, const POINT& sourcePoint)<br class="">{<br class=""></blockquote><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">This CopyBits and BltBits are not doing anymore the operation, should</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">be renamed to something like PrepareCopyBits (better names welcome)</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"></div></div></blockquote><div class=""><br class=""></div><div class="">But we still need the driver entry points, right?</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"> PAGED_CODE();<br class=""> QXLDrawable *drawable;<br class="">@@ -4373,18 +4396,18 @@ void QxlDevice::CopyBits(const RECT& rect, const<br class="">POINT& sourcePoint)<br class=""><br class=""> if (!(drawable = Drawable(QXL_COPY_BITS, &rect, NULL, 0))) {<br class=""> DbgPrint(TRACE_LEVEL_ERROR, ("Cannot get Drawable.\n"));<br class="">- return;<br class="">+ return NULL;<br class=""> }<br class=""><br class=""> drawable->u.copy_bits.src_pos.x = sourcePoint.x;<br class=""> drawable->u.copy_bits.src_pos.y = sourcePoint.y;<br class=""><br class="">- PushDrawable(drawable);<br class="">-<br class=""> DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));<br class="">+<br class="">+ return drawable;<br class="">}<br class=""><br class="">-VOID QxlDevice::BltBits (<br class="">+QXLDrawable *QxlDevice::BltBits (<br class=""> BLT_INFO* pDst,<br class=""> CONST BLT_INFO* pSrc,<br class=""> UINT NumRects,<br class="">@@ -4407,7 +4430,7 @@ VOID QxlDevice::BltBits (<br class=""><br class=""> if (!(drawable = Drawable(QXL_DRAW_COPY, pRects, NULL, 0))) {<br class=""> DbgPrint(TRACE_LEVEL_ERROR, ("Cannot get Drawable.\n"));<br class="">- return;<br class="">+ return NULL;<br class=""> }<br class=""><br class=""> CONST RECT* pRect = &pRects[0];<br class="">@@ -4480,9 +4503,9 @@ VOID QxlDevice::BltBits (<br class=""> drawable->surfaces_rects[0].top,<br class=""> drawable->surfaces_rects[0].bottom,<br class=""> drawable->u.copy.src_bitmap));<br class=""><br class="">- PushDrawable(drawable);<br class="">-<br class=""> DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));<br class="">+<br class="">+ return drawable;<br class="">}<br class=""><br class="">VOID QxlDevice::PutBytesAlign(QXLDataChunk **chunk_ptr, UINT8 **now_ptr,<br class="">diff --git a/qxldod/QxlDod.h b/qxldod/QxlDod.h<br class="">index 4a62680..f441f4b 100755<br class="">--- a/qxldod/QxlDod.h<br class="">+++ b/qxldod/QxlDod.h<br class="">@@ -495,12 +495,12 @@ public:<br class=""> BOOLEAN IsBIOSCompatible() { return FALSE; }<br class="">protected:<br class=""> NTSTATUS GetModeList(DXGK_DISPLAY_INFORMATION* pDispInfo);<br class="">- VOID BltBits (BLT_INFO* pDst,<br class="">+ QXLDrawable *BltBits (BLT_INFO* pDst,<br class=""> CONST BLT_INFO* pSrc,<br class=""> UINT NumRects,<br class=""> _In_reads_(NumRects) CONST RECT *pRects,<br class=""> POINT* pSourcePoint);<br class="">- void CopyBits(const RECT& rect, const POINT& sourcePoint);<br class="">+ QXLDrawable *CopyBits(const RECT& rect, const POINT& sourcePoint);<br class=""> QXLDrawable *Drawable(UINT8 type,<br class=""> CONST RECT *area,<br class=""> CONST RECT *clip,<br class=""></blockquote><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">Frediano</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">_______________________________________________</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">Spice-devel mailing list</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><a href="mailto:Spice-devel@lists.freedesktop.org" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Spice-devel@lists.freedesktop.org</a><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">https://lists.freedesktop.org/mailman/listinfo/spice-devel</a></div></div></blockquote></div><br class=""></div></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Spice-devel mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:Spice-devel@lists.freedesktop.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">Spice-devel@lists.freedesktop.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://lists.freedesktop.org/mailman/listinfo/spice-devel</a></div></blockquote></div><br class=""></div></body></html>