Related tdf#149890: SVG: pattern is displayed with black fill
Regression from5707b5dce7tdf#101083 speed up SVG rendering with pattern fill (2) This is the same thing I did in commit3cbe3a0259Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Mon Jun 14 15:05:59 2021 +0200 tdf#101083 speed up SVG rendering with pattern fill but cut and paste from the VclPixelProcessor2D to the CairoPixelProcessor2D code. Which makes this SVG render in reasonable time when using the cairo backend. We can probably do even better by cutting out the usage of VCL here, but this is good enough for now. + apply the same asaf2175bb87crashtesting: divide by zero since: commit7b807a6b79Date: Fri Jun 21 12:28:30 2024 +0200 tdf#161086 bitmap location wrong with SVG with an embedded PNG bodge it by using the requested width/height and not the possibly zero on fail actual sizes Change-Id: Ie0e0462e564a568f99d1c5b9c62f71049f71f9b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208275 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
This commit is contained in:
@@ -3575,7 +3575,12 @@ void CairoPixelProcessor2D::processPatternFillPrimitive2D(
|
||||
{
|
||||
mpTargetOutputDevice->Push(vcl::PushFlags::CLIPREGION);
|
||||
mpTargetOutputDevice->IntersectClipRegion(vcl::Region(aMask));
|
||||
mpTargetOutputDevice->DrawWallpaper(aMaskRect, Wallpaper(aTileImage));
|
||||
Wallpaper aWallpaper(aTileImage);
|
||||
aWallpaper.SetColor(COL_TRANSPARENT);
|
||||
Point aPaperPt(aMaskRect.getX() % nTileWidth, aMaskRect.getY() % nTileHeight);
|
||||
tools::Rectangle aPaperRect(aPaperPt, aTileImage.GetSizePixel());
|
||||
aWallpaper.SetRect(aPaperRect);
|
||||
mpTargetOutputDevice->DrawWallpaper(aMaskRect, aWallpaper);
|
||||
mpTargetOutputDevice->Pop();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user