vcl/source/outdev/bitmap.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
New commits: commit 509e34d69cd15dc8532f90e8875f8afbdb2cec60 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Jul 31 20:58:30 2020 +0100 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Sat Aug 1 19:29:43 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/+/99911 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.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) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits