提交 42c1f36b 编写于 作者: J jgodinez

8009199: Printed text become garbage on Mac OSX

Reviewed-by: bae, prr
上级 a7836c78
......@@ -143,6 +143,8 @@ void JavaCT_DrawGlyphVector
CGContextRef cgRef = qsdo->cgRef;
CGAffineTransform ctmText = CGContextGetTextMatrix(cgRef);
BOOL saved = false;
/* Save and restore of graphics context is done before the iteration.
This seems to work using our test case (see bug ID 7158350) so we are restoring it at
the end of the for loop. If we find out that save/restore outside the loop
......@@ -175,10 +177,19 @@ void JavaCT_DrawGlyphVector
CFRelease(fallback);
if (cgFallback) {
if (!saved) {
CGContextSaveGState(cgRef);
saved = true;
}
CGContextSetFont(cgRef, cgFallback);
CFRelease(cgFallback);
}
}
} else {
if (saved) {
CGContextRestoreGState(cgRef);
saved = false;
}
}
// if we have per-glyph transformations
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册