diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-11-14 20:35:44 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-11-15 14:43:54 +0100 |
commit | bad9b2d464cb350fd59e2808dc4e7415cc6658ea (patch) | |
tree | 750c526da4984123cd0b67f2d5ea43c22ab27f67 /vcl/quartz | |
parent | 1e15058e08445d2857755ec8ef06deb2e3393b97 (diff) |
vcl: The backend should decide whether fast alpha drawing is available.
The unx drawAlphaBitmap() already already checks that the source and
destination have the same size.
Windows and OpenGL should be able to handle that without trouble.
OS X would need some additional code, so added an early return for the case
the source and result sizes do not match.
Change-Id: Ib09654aaa9c9064c232cff5094fcaa1190e931c6
Diffstat (limited to 'vcl/quartz')
-rw-r--r-- | vcl/quartz/salgdicommon.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index ad15432e1a1f..6a8d953a32e2 100644 --- a/vcl/quartz/salgdicommon.cxx +++ b/vcl/quartz/salgdicommon.cxx @@ -568,6 +568,12 @@ bool AquaSalGraphics::drawAlphaBitmap( const SalTwoRect& rTR, { DBG_DRAW_OPERATION("drawAlphaBitmap", true); + if (rTR.mnSrcWidth != rTR.mnDestWidth || rTR.mnSrcHeight != rTR.mnDestHeight) + { + // TODO - would be better to scale it by the native code + return false; + } + // An image mask can't have a depth > 8 bits (should be 1 to 8 bits) if( rAlphaBmp.GetBitCount() > 8 ) { |