[Libreoffice-commits] core.git: drawinglayer/source
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 4 06:41:57 UTC 2020
drawinglayer/source/processor2d/vclhelperbufferdevice.cxx | 16 ++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
New commits:
commit 8e63a3623a05713154d798081b13374a819fa84f
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sat May 2 21:16:42 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon May 4 08:41:20 2020 +0200
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 at gmail.com>
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);
More information about the Libreoffice-commits
mailing list