vcl/headless/svpgdi.cxx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)
New commits: commit 68278820e03e71ee82ef200309cac055e6464820 Author: Michael Meeks <[email protected]> AuthorDate: Mon Oct 28 16:37:57 2019 +0000 Commit: Andras Timar <[email protected]> CommitDate: Mon Jan 6 16:19:24 2020 +0100 headless: optimize DrawWaveLine / drawPixel. ImplDrawWaveLine - used to render colored lines under mis-spelled and/or grammatically interesting sections uses (for better or worse) 'drawPixel' to draw the line. Implementing drawPixel with a tiny B2DPolyPolygon is easy reading but triggers the unbelievably expensive SystemDependentDataHolder paths as well as some big chunks of logic for very large numbers of pixels (if you have lots of mis-spelling this can make typing visibly slower.). Also includes other fixes: Author: Jan Holesovsky <[email protected]> Date: Wed Dec 4 18:23:22 2019 +0100 headless: Don't leak the cairo context in drawPixel(). Change-Id: If841f655ac634eee2dc7ca6e9445d2f204546545 Author: Jan Holesovsky <[email protected]> Date: Thu Dec 5 11:05:39 2019 +0100 drawPixel() should still get 'true' for bXorModeAllowed. That part of 7b267be4b2c87b2c3987d4d751307977a7d3ad41 was not necessary. Change-Id: Ie6ad513e27f820bcad5030579428374c8d22fb3d Reviewed-on: https://gerrit.libreoffice.org/81622 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84890 Reviewed-by: Andras Timar <[email protected]> Tested-by: Andras Timar <[email protected]> diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 11c6fc1d9589..598d4e7d94bf 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -678,17 +678,15 @@ void SvpSalGraphics::drawPixel( long nX, long nY ) void SvpSalGraphics::drawPixel( long nX, long nY, SalColor nSalColor ) { - SalColor aOrigFillColor = m_aFillColor; - SalColor aOrigLineColor = m_aLineColor; - - basegfx::B2DPolygon aRect = basegfx::utils::createPolygonFromRect(basegfx::B2DRectangle(nX, nY, nX+1, nY+1)); - m_aLineColor = SALCOLOR_NONE; - m_aFillColor = nSalColor; + cairo_t* cr = getCairoContext(true); + clipRegion(cr); - drawPolyPolygon(basegfx::B2DPolyPolygon(aRect)); + cairo_rectangle(cr, nX, nY, 1, 1); + applyColor(cr, aColor, 0.0); + cairo_fill(cr); - m_aFillColor = aOrigFillColor; - m_aLineColor = aOrigLineColor; + basegfx::B2DRange extents = getClippedFillDamage(cr); + releaseCairoContext(cr, true, extents); } void SvpSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight ) _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
