[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Aug 1 14:11:45 UTC 2020
vcl/source/outdev/bitmap.cxx | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
New commits:
commit 6beec0ec54975aa02e391c223633a42f6f5afe0e
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jul 31 20:58:30 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Aug 1 16:11:05 2020 +0200
tdf#135325 previews missing content drawn via DrawTransformedBitmapEx
Typically in these OutputDevice methods, the record-to-metafile case the
MetaFile is already written to before the test against mbOutputClipped to
determine that output to the current device would result in no visual output
(due to the output being outside the bounds of the device).
In this case the metafile is written after the test, so we must continue past
mbOutputClipped if recording to a metafile. It's typical to record with a
device of nominal size and play back later against something of a totally
different size.
Change-Id: Id1249b10f919165582f7de65b4cdc4d48074abaa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99900
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 83b625d828cb..83c1843a5300 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -1213,7 +1213,17 @@ void OutputDevice::DrawTransformedBitmapEx(
if ( mbInitClipRegion )
InitClipRegion();
- if ( mbOutputClipped )
+ const bool bMetafile(nullptr != mpMetaFile);
+ /*
+ tdf#135325 typically in these OutputDevice methods the in
+ record-to-metafile case MetaFile is already written to before the test
+ against mbOutputClipped to determine that output to the current device
+ would result in no visual output. In this case the metafile is written
+ after the test, so we must continue past mbOutputClipped if recording to
+ a metafile. It's typical to record with a device of nominal size and
+ play back later against something of a totally different size.
+ */
+ if (mbOutputClipped && !bMetafile)
return;
#ifdef DO_TIME_TEST
@@ -1233,7 +1243,6 @@ void OutputDevice::DrawTransformedBitmapEx(
static bool bAllowPreferDirectPaint(true);
const bool bInvert(RasterOp::Invert == meRasterOp);
const bool bBitmapChangedColor(mnDrawMode & (DrawModeFlags::BlackBitmap | DrawModeFlags::WhiteBitmap | DrawModeFlags::GrayBitmap ));
- const bool bMetafile(nullptr != mpMetaFile);
const bool bTryDirectPaint(!bInvert && !bBitmapChangedColor && !bMetafile);
if(bAllowPreferDirectPaint && bTryDirectPaint)
More information about the Libreoffice-commits
mailing list