Do not take into account move operations for mapping
This is a follow up of 31ca5d035d
("Implements screen to screen move correctly").
As now we don't copy memory to implement moves there's no
reason to take into account these area for memory mappings
as memory is not accessed anymore.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Yuri Benditovich <yuri.benditovich@daynix.com>
This commit is contained in:
parent
53ca7ce4cd
commit
b621c297bd
@ -3638,7 +3638,7 @@ QxlDevice::ExecutePresentDisplayOnly(
|
||||
// Source bitmap is in user mode, must be locked under __try/__except
|
||||
// and mapped to kernel space before use.
|
||||
{
|
||||
LONG maxHeight = GetMaxSourceMappingHeight(ctx->Moves, ctx->NumMoves, ctx->DirtyRect, ctx->NumDirtyRects);
|
||||
LONG maxHeight = GetMaxSourceMappingHeight(ctx->DirtyRect, ctx->NumDirtyRects);
|
||||
UINT sizeToMap = ctx->SrcPitch * maxHeight;
|
||||
|
||||
PMDL mdl = IoAllocateMdl((PVOID)SrcAddr, sizeToMap, FALSE, FALSE, NULL);
|
||||
@ -4533,17 +4533,10 @@ void QxlDevice::SetMonitorConfig(QXLHead * monitor_config)
|
||||
AsyncIo(QXL_IO_MONITORS_CONFIG_ASYNC, 0);
|
||||
}
|
||||
|
||||
LONG QxlDevice::GetMaxSourceMappingHeight(D3DKMT_MOVE_RECT* Moves, ULONG NumMoves, RECT* DirtyRects, ULONG NumDirtyRects)
|
||||
LONG QxlDevice::GetMaxSourceMappingHeight(RECT* DirtyRects, ULONG NumDirtyRects)
|
||||
{
|
||||
PAGED_CODE();
|
||||
LONG maxHeight = 0;
|
||||
if (Moves != NULL) {
|
||||
for (UINT i = 0; i < NumMoves; i++) {
|
||||
const POINT& pSourcePoint = Moves[i].SourcePoint;
|
||||
const RECT& pDestRect = Moves[i].DestRect;
|
||||
maxHeight = MAX(maxHeight, pDestRect.bottom - pDestRect.top + pSourcePoint.y);
|
||||
}
|
||||
}
|
||||
if (DirtyRects != NULL) {
|
||||
for (UINT i = 0; i < NumDirtyRects; i++) {
|
||||
const RECT& pDirtyRect = DirtyRects[i];
|
||||
|
@ -555,7 +555,7 @@ private:
|
||||
NTSTATUS SetCustomDisplay(QXLEscapeSetCustomDisplay* custom_display);
|
||||
void SetMonitorConfig(QXLHead* monitor_config);
|
||||
|
||||
static LONG GetMaxSourceMappingHeight(D3DKMT_MOVE_RECT* Moves, ULONG NumMoves, RECT* DirtyRects, ULONG NumDirtyRects);
|
||||
static LONG GetMaxSourceMappingHeight(RECT* DirtyRects, ULONG NumDirtyRects);
|
||||
|
||||
private:
|
||||
PUCHAR m_IoBase;
|
||||
|
Loading…
Reference in New Issue
Block a user