Fixed swscale and cairo checks
This commit is contained in:
parent
727f2bc652
commit
3bedc1f92e
@ -345,7 +345,7 @@ static UINT rdpgfx_send_supported_caps(GENERIC_CHANNEL_CALLBACK* callback)
|
||||
capsSet->version = RDPGFX_CAPVERSION_107;
|
||||
capsSet->length = 0x4;
|
||||
capsSet->flags = caps10Flags;
|
||||
#if !defined(CAIRO_FOUND) && !defined(SWSCALE_FOUND)
|
||||
#if !defined(WITH_CAIRO) && !defined(WITH_SWSCALE)
|
||||
capsSet->flags |= RDPGFX_CAPS_FLAG_SCALEDMAP_DISABLE;
|
||||
#endif
|
||||
}
|
||||
|
@ -23,6 +23,8 @@
|
||||
#cmakedefine WITH_CUPS
|
||||
#cmakedefine WITH_JPEG
|
||||
#cmakedefine WITH_WIN8
|
||||
#cmakedefine WITH_CAIRO
|
||||
#cmakedefine WITH_SWSCALE
|
||||
#cmakedefine WITH_RDPSND_DSOUND
|
||||
|
||||
#cmakedefine WITH_WINMM
|
||||
|
@ -91,11 +91,9 @@ endif(WITH_CAIRO)
|
||||
|
||||
# Prefer SWScale over Cairo, both at the same time are not possible.
|
||||
if (WITH_SWSCALE)
|
||||
add_definitions(-DSWSCALE_FOUND=1)
|
||||
include_directories(${SWScale_INCLUDE_DIR})
|
||||
freerdp_library_add(${SWScale_LIBRARY})
|
||||
elseif (WITH_CAIRO)
|
||||
add_definitions(-DCAIRO_FOUND=1)
|
||||
include_directories(${CAIRO_INCLUDE_DIR})
|
||||
freerdp_library_add(${CAIRO_LIBRARY})
|
||||
else()
|
||||
|
@ -31,11 +31,11 @@
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/primitives.h>
|
||||
|
||||
#if defined(CAIRO_FOUND)
|
||||
#if defined(WITH_CAIRO)
|
||||
#include <cairo.h>
|
||||
#endif
|
||||
|
||||
#if defined(SWSCALE_FOUND)
|
||||
#if defined(WITH_SWSCALE)
|
||||
#include <libswscale/swscale.h>
|
||||
#endif
|
||||
|
||||
@ -746,7 +746,7 @@ BOOL freerdp_image_fill(BYTE* pDstData, DWORD DstFormat, UINT32 nDstStep, UINT32
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if defined(SWSCALE_FOUND)
|
||||
#if defined(WITH_SWSCALE)
|
||||
static int av_format_for_buffer(UINT32 format)
|
||||
{
|
||||
switch (format)
|
||||
@ -782,7 +782,7 @@ BOOL freerdp_image_scale(BYTE* pDstData, DWORD DstFormat, UINT32 nDstStep, UINT3
|
||||
if (nSrcStep == 0)
|
||||
nSrcStep = nSrcWidth * FreeRDPGetBytesPerPixel(SrcFormat);
|
||||
|
||||
#if defined(SWSCALE_FOUND) || defined(CAIRO_FOUND)
|
||||
#if defined(WITH_SWSCALE) || defined(WITH_CAIRO)
|
||||
const BYTE* src = &pSrcData[nXSrc * FreeRDPGetBytesPerPixel(SrcFormat) + nYSrc * nSrcStep];
|
||||
BYTE* dst = &pDstData[nXDst * FreeRDPGetBytesPerPixel(DstFormat) + nYDst * nDstStep];
|
||||
#endif
|
||||
@ -795,7 +795,7 @@ BOOL freerdp_image_scale(BYTE* pDstData, DWORD DstFormat, UINT32 nDstStep, UINT3
|
||||
FREERDP_FLIP_NONE);
|
||||
}
|
||||
else
|
||||
#if defined(SWSCALE_FOUND)
|
||||
#if defined(WITH_SWSCALE)
|
||||
{
|
||||
int res;
|
||||
struct SwsContext* resize;
|
||||
@ -819,7 +819,7 @@ BOOL freerdp_image_scale(BYTE* pDstData, DWORD DstFormat, UINT32 nDstStep, UINT3
|
||||
sws_freeContext(resize);
|
||||
}
|
||||
|
||||
#elif defined(CAIRO_FOUND)
|
||||
#elif defined(WITH_CAIRO)
|
||||
{
|
||||
const double sx = (double)nDstWidth / (double)nSrcWidth;
|
||||
const double sy = (double)nDstHeight / (double)nSrcHeight;
|
||||
|
Loading…
Reference in New Issue
Block a user