Kaydet (Commit) 5333743d authored tarafından Julien Nabet's avatar Julien Nabet Kaydeden (comit) Caolán McNamara

tdf#100994: use CGContextStrokePath instead

This is a blind fix attempt to fix "Freeze when first action after launch with OSX Sierra with iMac 5K"

I started from bt:
frame #9: 0x00007fffbe094cf6 CoreGraphics`CGContextDrawPath + 183
frame #10: 0x0000000102b16cda libvcllo.dylib`AquaSalGraphics::drawPolyLine(unsigned int, SalPoint const*) + 330
frame #11: 0x0000000102929039 libvcllo.dylib`OutputDevice::drawPolyLine(tools::Polygon const&, LineInfo const&) + 361
frame #12: 0x0000000102928d30 libvcllo.dylib`OutputDevice::DrawPolyLine(basegfx::B2DPolygon const&, double, basegfx::B2DLineJoin, com::sun::star::drawing::LineCap, double) + 768
(see https://bug-attachments.documentfoundation.org/attachment.cgi?id=127502)

then:
http://stackoverflow.com/questions/32871234/how-to-make-kcgpathstroke-work-in-swift-2
which advises to replace:
 CGContextDrawPath(ctx, kCGPathStroke)
by
CGContextDrawPath(ctx, .Stroke)

and finally this:
http://stackoverflow.com/questions/37838578/how-to-stroke-a-cgpath
which advises to directly use this:
CGContextStrokePath(context)

Change-Id: I99f9800c39f18d16488f7ef4114a71722f9b8123
Reviewed-on: https://gerrit.libreoffice.org/29194Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst ecdec24c
......@@ -1439,8 +1439,8 @@ void AquaSalGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint *pPtAry )
SAL_INFO( "vcl.cg", "CGContextAddLineToPoint(" << mrContext << "," << fX << "," << fY << ")" );
CGContextAddLineToPoint( mrContext, fX, fY );
}
SAL_INFO( "vcl.cg", "CGContextDrawPath(" << mrContext << ",kCGPathStroke)" );
CGContextDrawPath( mrContext, kCGPathStroke );
SAL_INFO( "vcl.cg", "CGContextStrokePath(" << mrContext << ")" );
CGContextStrokePath(mrContext);
RefreshRect( nX, nY, nWidth, nHeight );
......
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