Kaydet (Commit) b1f961e3 authored tarafından Caolán McNamara's avatar Caolán McNamara

tdf#115843 avoid using transparent virtualdevice when 100% opaque

which for the common case avoids the narrowing of hidpi outputdevices
through non-hidpi bitmaps

Change-Id: Ibdc004a0946e8cb118818e58a01e5791c869353a
Reviewed-on: https://gerrit.libreoffice.org/69930
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 11fe18ea
...@@ -729,29 +729,32 @@ namespace drawinglayer ...@@ -729,29 +729,32 @@ namespace drawinglayer
// back to old OutDev // back to old OutDev
mpOutputDevice = pLastOutputDevice; mpOutputDevice = pLastOutputDevice;
// draw mask // if the mask fills the whole area we can skip
if(getOptionsDrawinglayer().IsAntiAliasing()) // creating a transparent vd and filling it.
if (!basegfx::utils::isRectangle(aMask))
{ {
// with AA, use 8bit AlphaMask to get nice borders // draw mask
VirtualDevice& rTransparence = aBufferDevice.getTransparence(); if(getOptionsDrawinglayer().IsAntiAliasing())
rTransparence.SetLineColor(); {
rTransparence.SetFillColor(COL_BLACK); // with AA, use 8bit AlphaMask to get nice borders
rTransparence.DrawPolyPolygon(aMask); VirtualDevice& rTransparence = aBufferDevice.getTransparence();
rTransparence.SetLineColor();
// dump buffer to outdev rTransparence.SetFillColor(COL_BLACK);
aBufferDevice.paint(); rTransparence.DrawPolyPolygon(aMask);
} }
else else
{ {
// No AA, use 1bit mask // No AA, use 1bit mask
VirtualDevice& rMask = aBufferDevice.getMask(); VirtualDevice& rMask = aBufferDevice.getMask();
rMask.SetLineColor(); rMask.SetLineColor();
rMask.SetFillColor(COL_BLACK); rMask.SetFillColor(COL_BLACK);
rMask.DrawPolyPolygon(aMask); rMask.DrawPolyPolygon(aMask);
}
// dump buffer to outdev
aBufferDevice.paint();
} }
// dump buffer to outdev
aBufferDevice.paint();
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment