summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-28 15:27:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-29 08:40:56 +0200
commitb153d147c9d813f78dd551fc186c261f52c929a1 (patch)
treecfb9706eb8dd8840e1642a4eb55ad5302abca55a /canvas
parentbd944fe3812fd9fa5a90e98cdac4a77f1a4e6865 (diff)
remove support for BITMASK in vcl backends
Rather use a proper alpha channel if we need transparency. This is another small step towards merged alpha in our vcl layer. I suspect the intent in a lot of this code was to save memory. Which have been a thing way back then, but these days our backends mostly end up doing a copy-and-convert to a real alpha channel anyway, so the existing code is actually now a pessimisation. Change-Id: I4a2bcbb2f76b841f05bc00580f364492829c69de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114808 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/vcl/backbuffer.cxx9
-rw-r--r--canvas/source/vcl/backbuffer.hxx11
-rw-r--r--canvas/source/vcl/canvascustomsprite.cxx5
3 files changed, 6 insertions, 19 deletions
diff --git a/canvas/source/vcl/backbuffer.cxx b/canvas/source/vcl/backbuffer.cxx
index c2779cdf0489..684a02c8bd55 100644
--- a/canvas/source/vcl/backbuffer.cxx
+++ b/canvas/source/vcl/backbuffer.cxx
@@ -27,14 +27,9 @@
namespace vclcanvas
{
- BackBuffer::BackBuffer( const OutputDevice& rRefDevice,
- bool bMonochromeBuffer ) :
- maVDev( VclPtr<VirtualDevice>::Create( rRefDevice,
- bMonochromeBuffer ? DeviceFormat::BITMASK : DeviceFormat::DEFAULT ) )
+ BackBuffer::BackBuffer( const OutputDevice& rRefDevice ) :
+ maVDev( VclPtr<VirtualDevice>::Create( rRefDevice, DeviceFormat::DEFAULT ) )
{
- if( bMonochromeBuffer )
- return;
-
tools::SetDefaultDeviceAntiAliasing( maVDev );
}
diff --git a/canvas/source/vcl/backbuffer.hxx b/canvas/source/vcl/backbuffer.hxx
index 6bbeb85ec54b..0e31111b6fcf 100644
--- a/canvas/source/vcl/backbuffer.hxx
+++ b/canvas/source/vcl/backbuffer.hxx
@@ -31,15 +31,8 @@ namespace vclcanvas
class BackBuffer : public OutDevProvider
{
public:
- /** Create a backbuffer for given reference device
-
- @param bMonochromeBuffer
- When false, default depth of reference device is
- chosen. When true, the buffer will be monochrome, i.e. one
- bit deep.
- */
- BackBuffer( const OutputDevice& rRefDevice,
- bool bMonochromeBuffer=false );
+ /** Create a backbuffer for given reference device */
+ BackBuffer( const OutputDevice& rRefDevice );
virtual ~BackBuffer() override;
virtual OutputDevice& getOutDev() override;
diff --git a/canvas/source/vcl/canvascustomsprite.cxx b/canvas/source/vcl/canvascustomsprite.cxx
index 9d1f83a74ef7..4bdebd448b0c 100644
--- a/canvas/source/vcl/canvascustomsprite.cxx
+++ b/canvas/source/vcl/canvascustomsprite.cxx
@@ -58,9 +58,8 @@ namespace vclcanvas
BackBufferSharedPtr pBackBuffer = std::make_shared<BackBuffer>( rOutDevProvider->getOutDev() );
pBackBuffer->setSize( aSize );
- // create mask backbuffer, with one bit color depth
- BackBufferSharedPtr pBackBufferMask = std::make_shared<BackBuffer>( rOutDevProvider->getOutDev(),
- true );
+ // create mask backbuffer
+ BackBufferSharedPtr pBackBufferMask = std::make_shared<BackBuffer>( rOutDevProvider->getOutDev() );
pBackBufferMask->setSize( aSize );
// TODO(F1): Implement alpha vdev (could prolly enable