diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-05-02 21:16:42 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-05-04 08:41:20 +0200 |
commit | 8e63a3623a05713154d798081b13374a819fa84f (patch) | |
tree | 64364161e50970e70ea7e77926d155fdbe50c558 /drawinglayer | |
parent | f256d5d5cb3f715325c2bff03c2cca2046bbf97c (diff) |
dl: replace OSL_ENSURE with SAL_WARN_IF in impBufferDevice
Change-Id: I457b9310109157da03b6c310783651f5232d2054
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93364
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/processor2d/vclhelperbufferdevice.cxx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx index 54206abf7aa5..534c512daa42 100644 --- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx +++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx @@ -219,7 +219,8 @@ void VDevBuffer::free(VirtualDevice& rDevice) { ::osl::MutexGuard aGuard(m_aMutex); const auto aUsedFound = std::find(maUsedBuffers.begin(), maUsedBuffers.end(), &rDevice); - OSL_ENSURE(aUsedFound != maUsedBuffers.end(), "OOps, non-registered buffer freed (!)"); + SAL_WARN_IF(aUsedFound == maUsedBuffers.end(), "drawinglayer", + "OOps, non-registered buffer freed (!)"); maUsedBuffers.erase(aUsedFound); maFreeBuffers.emplace_back(&rDevice); @@ -286,8 +287,8 @@ impBufferDevice::impBufferDevice(OutputDevice& rOutDev, const basegfx::B2DRange& #endif // #i93485# assert when copying from window to VDev is used - OSL_ENSURE( - mrOutDev.GetOutDevType() != OUTDEV_WINDOW, + SAL_WARN_IF( + mrOutDev.GetOutDevType() == OUTDEV_WINDOW, "drawinglayer", "impBufferDevice render helper: Copying from Window to VDev, this should be avoided (!)"); const bool bWasEnabledSrc(mrOutDev.IsMapModeEnabled()); @@ -424,13 +425,15 @@ void impBufferDevice::paint(double fTrans) VirtualDevice& impBufferDevice::getContent() { - assert(mpContent && "impBufferDevice: No content, check isVisible() before accessing (!)"); + SAL_WARN_IF(!mpContent, "drawinglayer", + "impBufferDevice: No content, check isVisible() before accessing (!)"); return *mpContent; } VirtualDevice& impBufferDevice::getMask() { - assert(mpContent && "impBufferDevice: No content, check isVisible() before accessing (!)"); + SAL_WARN_IF(!mpContent, "drawinglayer", + "impBufferDevice: No content, check isVisible() before accessing (!)"); if (!mpMask) { mpMask = getVDevBuffer().alloc(mrOutDev, maDestPixel.GetSize(), true, true); @@ -444,7 +447,8 @@ VirtualDevice& impBufferDevice::getMask() VirtualDevice& impBufferDevice::getTransparence() { - OSL_ENSURE(mpContent, "impBufferDevice: No content, check isVisible() before accessing (!)"); + SAL_WARN_IF(!mpContent, "drawinglayer", + "impBufferDevice: No content, check isVisible() before accessing (!)"); if (!mpAlpha) { mpAlpha = getVDevBuffer().alloc(mrOutDev, maDestPixel.GetSize(), true, false); |