You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before this commit, the Core Text renderer relied on a legacy behavior
of NSView to keep its content across draws. setNeedsDisplayInRect: drew
over parts of the existing content as drawing commands were received,
without ever redrawing old content.
Layer backed views don't preserve content between draws and may be asked
to redraw at any time, and layer backing is default on in the 10.14 SDK.
This change adds a way to draw to a CGBitmapContext and then display
that in the view's layer. It's similar to the CGLayer path, but I wasn't
able to get the CGLayer path to work without hanging or crashing when I
scrolled. My best guess from looking at stack traces is that using
CGContextDrawLayerInRect to draw a layer into itself doesn't actually
copy pixels, but adds the self-draw as an action to be performed when
the CGLayer is drawn into a bitmap context. Scrolling stacks these
actions, which either hangs or overflows the stack when drawn.
The new code is controlled by the MMBufferedDrawing user default, which
is on by default on macOS >= 10.14 with this change. Fixes#751.
0 commit comments