Kaydet (Commit) 962e4113 authored tarafından Caolán McNamara's avatar Caolán McNamara

some android build fixes

Change-Id: I2d60a6d70ca9d63f49b12b5d4c3855cc4ef53478
üst c671aac4
...@@ -123,7 +123,6 @@ public: ...@@ -123,7 +123,6 @@ public:
: SvpSalFrame( pInstance, pParent, nSalFrameStyle, : SvpSalFrame( pInstance, pParent, nSalFrameStyle,
pSysParent ) pSysParent )
{ {
enableDamageTracker();
if (pParent == NULL && viewWidth > 1 && viewHeight > 1) if (pParent == NULL && viewWidth > 1 && viewHeight > 1)
SetPosSize(0, 0, viewWidth, viewHeight, SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT); SetPosSize(0, 0, viewWidth, viewHeight, SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT);
} }
......
...@@ -79,10 +79,6 @@ rDevice ...@@ -79,10 +79,6 @@ rDevice
#endif #endif
#if CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 12, 0)
# define cairo_surface_create_similar_image cairo_surface_create_similar
#endif
namespace namespace
{ {
cairo_rectangle_int_t getFillDamage(cairo_t* cr) cairo_rectangle_int_t getFillDamage(cairo_t* cr)
...@@ -998,10 +994,17 @@ void SvpSalGraphics::copyBits( const SalTwoRect& rTR, ...@@ -998,10 +994,17 @@ void SvpSalGraphics::copyBits( const SalTwoRect& rTR,
if (pSrc == this) if (pSrc == this)
{ {
//self copy is a problem, so dup source in that case //self copy is a problem, so dup source in that case
#if CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 12, 0)
pCopy = cairo_surface_create_similar(source,
cairo_surface_get_content(m_pSurface),
aTR.mnSrcWidth,
aTR.mnSrcHeight);
#else
pCopy = cairo_surface_create_similar_image(source, pCopy = cairo_surface_create_similar_image(source,
cairo_image_surface_get_format(m_pSurface), cairo_image_surface_get_format(m_pSurface),
aTR.mnSrcWidth, aTR.mnSrcWidth,
aTR.mnSrcHeight); aTR.mnSrcHeight);
#endif
cairo_t* cr = cairo_create(pCopy); cairo_t* cr = cairo_create(pCopy);
cairo_set_source_surface(cr, source, -aTR.mnSrcX, -aTR.mnSrcY); cairo_set_source_surface(cr, source, -aTR.mnSrcX, -aTR.mnSrcY);
...@@ -1322,10 +1325,10 @@ void SvpSalGraphics::releaseCairoContext(cairo_t* cr, bool bXorModeAllowed, cons ...@@ -1322,10 +1325,10 @@ void SvpSalGraphics::releaseCairoContext(cairo_t* cr, bool bXorModeAllowed, cons
sal_Int32 nExtentsRight(extents.x + extents.width), nExtentsBottom(extents.y + extents.height); sal_Int32 nExtentsRight(extents.x + extents.width), nExtentsBottom(extents.y + extents.height);
sal_Int32 nWidth = cairo_image_surface_get_width(m_pSurface); sal_Int32 nWidth = cairo_image_surface_get_width(m_pSurface);
sal_Int32 nHeight = cairo_image_surface_get_height(m_pSurface); sal_Int32 nHeight = cairo_image_surface_get_height(m_pSurface);
nExtentsLeft = std::max(nExtentsLeft, 0); nExtentsLeft = std::max<sal_Int32>(nExtentsLeft, 0);
nExtentsTop = std::max(nExtentsTop, 0); nExtentsTop = std::max<sal_Int32>(nExtentsTop, 0);
nExtentsRight = std::min(nExtentsRight, nWidth); nExtentsRight = std::min<sal_Int32>(nExtentsRight, nWidth);
nExtentsBottom = std::min(nExtentsBottom, nHeight); nExtentsBottom = std::min<sal_Int32>(nExtentsBottom, nHeight);
cairo_surface_t* surface = cairo_get_target(cr); cairo_surface_t* surface = cairo_get_target(cr);
cairo_surface_flush(surface); cairo_surface_flush(surface);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment