summaryrefslogtreecommitdiffstats
path: root/vcl/unx
diff options
context:
space:
mode:
authorLouis-Francis Ratté-Boulianne <lfrb@collabora.com>2014-11-18 12:34:53 -0500
committerJan Holesovsky <kendy@collabora.com>2014-11-22 20:14:16 +0100
commit4b6feefa51405e1313de62e1a19c4c213e79c22f (patch)
tree13796bcb39957f93c01bf338fc605204027bee48 /vcl/unx
parentvcl: Actually keep the new offscreen texture around (diff)
downloadcore-4b6feefa51405e1313de62e1a19c4c213e79c22f.tar.gz
core-4b6feefa51405e1313de62e1a19c4c213e79c22f.zip
vcl: Add support for backend-dependent blending of bitmaps (mask and alpha)
Change-Id: Iba64eb42965c86ca5655b9a105ef3f397e033ecf
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/generic/gdi/gdiimpl.cxx12
-rw-r--r--vcl/unx/generic/gdi/gdiimpl.hxx12
-rw-r--r--vcl/unx/generic/gdi/salgdi2.cxx14
3 files changed, 38 insertions, 0 deletions
diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx
index ee7e596fbc95..bcf8d0523abd 100644
--- a/vcl/unx/generic/gdi/gdiimpl.cxx
+++ b/vcl/unx/generic/gdi/gdiimpl.cxx
@@ -821,6 +821,18 @@ void X11SalGraphicsImpl::drawMaskedBitmap( const SalTwoRect& rPosAry,
XFreePixmap( pXDisp, aBG );
}
+bool X11SalGraphicsImpl::blendBitmap( const SalTwoRect&,
+ const SalBitmap& )
+{
+ return false;
+}
+
+bool X11SalGraphicsImpl::blendAlphaBitmap( const SalTwoRect&,
+ const SalBitmap&, const SalBitmap&, const SalBitmap& )
+{
+ return false;
+}
+
bool X11SalGraphicsImpl::drawAlphaBitmap( const SalTwoRect& rTR,
const SalBitmap& rSrcBitmap, const SalBitmap& rAlphaBmp )
{
diff --git a/vcl/unx/generic/gdi/gdiimpl.hxx b/vcl/unx/generic/gdi/gdiimpl.hxx
index 2d9294a629d9..20c995fa6a7e 100644
--- a/vcl/unx/generic/gdi/gdiimpl.hxx
+++ b/vcl/unx/generic/gdi/gdiimpl.hxx
@@ -225,6 +225,18 @@ public:
void* pPtr,
sal_uLong nSize ) SAL_OVERRIDE;
+ /** Blend bitmap with color channels */
+ virtual bool blendBitmap(
+ const SalTwoRect&,
+ const SalBitmap& rBitmap ) SAL_OVERRIDE;
+
+ /** Render bitmap by blending using the mask and alpha channel */
+ virtual bool blendAlphaBitmap(
+ const SalTwoRect&,
+ const SalBitmap& rSrcBitmap,
+ const SalBitmap& rMaskBitmap,
+ const SalBitmap& rAlphaBitmap ) SAL_OVERRIDE;
+
/** Render bitmap with alpha channel
@param rSourceBitmap
diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx
index 9ef50b87c747..b848d660447b 100644
--- a/vcl/unx/generic/gdi/salgdi2.cxx
+++ b/vcl/unx/generic/gdi/salgdi2.cxx
@@ -167,6 +167,20 @@ void X11SalGraphics::copyArea ( long nDestX, long nDestY,
mpImpl->copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, n );
}
+bool X11SalGraphics::blendBitmap( const SalTwoRect& rTR,
+ const SalBitmap& rBitmap )
+{
+ return mpImpl->blendBitmap( rTR, rBitmap );
+}
+
+bool X11SalGraphics::blendAlphaBitmap( const SalTwoRect& rTR,
+ const SalBitmap& rSrcBitmap,
+ const SalBitmap& rMaskBitmap,
+ const SalBitmap& rAlphaBitmap )
+{
+ return mpImpl->blendAlphaBitmap( rTR, rSrcBitmap, rMaskBitmap, rAlphaBitmap );
+}
+
void X11SalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap )
{
mpImpl->drawBitmap( rPosAry, rSalBitmap );