summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-14 09:33:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-17 16:49:38 +0200
commit988e2827319fa2fe04bb818880c1f381bd08a314 (patch)
treee69666af2902daa2fe46d946971e3bd48b547af1 /drawinglayer
parent7852fdc1ae87434e06bbbfd05a349c4624fbfd50 (diff)
loplugin:constantparam
Change-Id: I1d518bef47c838d03d8526a6a8fffd36d2ee68d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114074 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/vclhelperbufferdevice.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
index 7837d0bdd857..f6bf0f10c9f7 100644
--- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
+++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
@@ -67,8 +67,7 @@ public:
VDevBuffer();
virtual ~VDevBuffer() override;
- VclPtr<VirtualDevice> alloc(OutputDevice& rOutDev, const Size& rSizePixel, bool bMonoChrome,
- bool bTransparent);
+ VclPtr<VirtualDevice> alloc(OutputDevice& rOutDev, const Size& rSizePixel, bool bTransparent);
void free(VirtualDevice& rDevice);
// Timer virtuals
@@ -103,12 +102,12 @@ VDevBuffer::~VDevBuffer()
}
VclPtr<VirtualDevice> VDevBuffer::alloc(OutputDevice& rOutDev, const Size& rSizePixel,
- bool bMonoChrome, bool bTransparent)
+ bool bTransparent)
{
::osl::MutexGuard aGuard(m_aMutex);
VclPtr<VirtualDevice> pRetval;
- sal_Int32 nBits = bMonoChrome ? 1 : rOutDev.GetBitCount();
+ sal_Int32 nBits = rOutDev.GetBitCount();
bool bOkay(false);
if (!maFreeBuffers.empty())
@@ -204,9 +203,9 @@ VclPtr<VirtualDevice> VDevBuffer::alloc(OutputDevice& rOutDev, const Size& rSize
// no success yet, create new buffer
if (!pRetval)
{
- pRetval = VclPtr<VirtualDevice>::Create(
- rOutDev, bMonoChrome ? DeviceFormat::BITMASK : DeviceFormat::DEFAULT,
- bTransparent ? DeviceFormat::DEFAULT : DeviceFormat::NONE);
+ pRetval = VclPtr<VirtualDevice>::Create(rOutDev, DeviceFormat::DEFAULT,
+ bTransparent ? DeviceFormat::DEFAULT
+ : DeviceFormat::NONE);
maDeviceTemplates[pRetval] = &rOutDev;
pRetval->SetOutputSizePixel(rSizePixel, true);
}
@@ -287,7 +286,7 @@ impBufferDevice::impBufferDevice(OutputDevice& rOutDev, const basegfx::B2DRange&
if (!isVisible())
return;
- mpContent = getVDevBuffer().alloc(mrOutDev, maDestPixel.GetSize(), false, true);
+ mpContent = getVDevBuffer().alloc(mrOutDev, maDestPixel.GetSize(), true);
// #i93485# assert when copying from window to VDev is used
SAL_WARN_IF(
@@ -408,7 +407,7 @@ VirtualDevice& impBufferDevice::getTransparence()
"impBufferDevice: No content, check isVisible() before accessing (!)");
if (!mpAlpha)
{
- mpAlpha = getVDevBuffer().alloc(mrOutDev, maDestPixel.GetSize(), false, false);
+ mpAlpha = getVDevBuffer().alloc(mrOutDev, maDestPixel.GetSize(), false);
mpAlpha->SetMapMode(mpContent->GetMapMode());
// copy AA flag for new target; masking needs to be smooth