mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
Fixed warnings and cleaned up gfx related xfreerdp code.
This commit is contained in:
@@ -73,10 +73,7 @@ void xf_OnChannelConnectedEventHandler(void* context, ChannelConnectedEventArgs*
|
||||
}
|
||||
else if (strcmp(e->name, VIDEO_CONTROL_DVC_CHANNEL_NAME) == 0)
|
||||
{
|
||||
if (settings->SoftwareGdi)
|
||||
gdi_video_control_init(xfc->context.gdi, (VideoClientContext*)e->pInterface);
|
||||
else
|
||||
xf_video_control_init(xfc, (VideoClientContext*)e->pInterface);
|
||||
xf_video_control_init(xfc, (VideoClientContext*)e->pInterface);
|
||||
}
|
||||
else if (strcmp(e->name, VIDEO_DATA_DVC_CHANNEL_NAME) == 0)
|
||||
{
|
||||
|
||||
@@ -36,17 +36,6 @@ struct xf_gfx_surface
|
||||
};
|
||||
typedef struct xf_gfx_surface xfGfxSurface;
|
||||
|
||||
struct xf_gfx_cache_entry
|
||||
{
|
||||
UINT64 cacheKey;
|
||||
UINT32 width;
|
||||
UINT32 height;
|
||||
BYTE* data;
|
||||
UINT32 scanline;
|
||||
UINT32 format;
|
||||
};
|
||||
typedef struct xf_gfx_cache_entry xfGfxCacheEntry;
|
||||
|
||||
UINT xf_OutputExpose(xfContext* xfc, UINT32 x, UINT32 y,
|
||||
UINT32 width, UINT32 height);
|
||||
|
||||
|
||||
@@ -298,7 +298,11 @@ static BOOL avc444_ensure_buffer(H264_CONTEXT* h264,
|
||||
UINT32* piDstSize = h264->iYUV444Size;
|
||||
UINT32* piDstStride = h264->iYUV444Stride;
|
||||
BYTE** ppYUVDstData = h264->pYUV444Data;
|
||||
UINT32 padDstHeight = nDstHeight + 16; /* Need alignment to 16x16 blocks */
|
||||
const UINT32 pad = nDstHeight % 16;
|
||||
UINT32 padDstHeight = nDstHeight; /* Need alignment to 16x16 blocks */
|
||||
|
||||
if (pad != 0)
|
||||
padDstHeight += 16 - pad;
|
||||
|
||||
if ((piMainStride[0] != piDstStride[0]) ||
|
||||
(piDstSize[0] != piMainStride[0] * padDstHeight))
|
||||
|
||||
@@ -133,12 +133,12 @@ static UINT gdi_OutputUpdate(rdpGdi* gdi, gdiGfxSurface* surface)
|
||||
{
|
||||
const UINT32 nXSrc = rects[i].left;
|
||||
const UINT32 nYSrc = rects[i].top;
|
||||
const UINT32 nXDst = surfaceX + nXSrc * sx;
|
||||
const UINT32 nYDst = surfaceY + nYSrc * sy;
|
||||
const UINT32 nXDst = (UINT32)(surfaceX + nXSrc * sx);
|
||||
const UINT32 nYDst = (UINT32)(surfaceY + nYSrc * sy);
|
||||
const UINT32 swidth = rects[i].right - rects[i].left;
|
||||
const UINT32 sheight = rects[i].bottom - rects[i].top;
|
||||
const UINT32 dwidth = swidth * sx;
|
||||
const UINT32 dheight = sheight * sy;
|
||||
const UINT32 dwidth = (UINT32)(swidth * sx);
|
||||
const UINT32 dheight = (UINT32)(sheight * sy);
|
||||
|
||||
if (!freerdp_image_scale(gdi->primary_buffer, gdi->dstFormat,
|
||||
gdi->stride, nXDst, nYDst, dwidth, dheight,
|
||||
@@ -146,7 +146,7 @@ static UINT gdi_OutputUpdate(rdpGdi* gdi, gdiGfxSurface* surface)
|
||||
surface->scanline, nXSrc, nYSrc, swidth, sheight))
|
||||
return CHANNEL_RC_NULL_DATA;
|
||||
|
||||
gdi_InvalidateRegion(gdi->primary->hdc, nXDst, nYDst, dwidth, dheight);
|
||||
gdi_InvalidateRegion(gdi->primary->hdc, (INT32)nXDst, (INT32)nYDst, (INT32)dwidth, (INT32)dheight);
|
||||
}
|
||||
|
||||
rc = CHANNEL_RC_OK;
|
||||
@@ -189,10 +189,10 @@ static UINT gdi_UpdateSurfaces(RdpgfxClientContext* context)
|
||||
continue;
|
||||
}
|
||||
|
||||
status = ERROR_INTERNAL_ERROR;
|
||||
if (!surface->outputMapped)
|
||||
continue;
|
||||
|
||||
if (surface->outputMapped)
|
||||
status = gdi_OutputUpdate(gdi, surface);
|
||||
status = gdi_OutputUpdate(gdi, surface);
|
||||
|
||||
if (status != CHANNEL_RC_OK)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user