]> git.eshelyaron.com Git - emacs.git/commit
Draw to offscreen buffer on macOS
authorAlan Third <address@hidden>
Sun, 10 Feb 2019 10:59:29 +0000 (10:59 +0000)
committerAlan Third <alan@idiocy.org>
Fri, 24 Jan 2020 16:05:42 +0000 (16:05 +0000)
commitf674c905dc98a4617c40c4bc115462b4ad2ebfc2
tree7c75bab5bdc5f04f73f8f254eb0a76a54ca2e0b1
parent3ad7813296760cecfd3fd35a5fb47930d61a573d
Draw to offscreen buffer on macOS

* src/nsfns.m (x_set_background_color): Clear the frame after changing
the background color, not before.
* src/nsterm.h (drawingBuffer): New variable.
([EmacsView focusOnDrawingBuffer]):
([EmacsView copyRect:to:]):
([EmacsView createDrawingBufferWithRect:]): New methods.
* src/nsterm.m (ns_update_begin):
(ns_update_end):
(ns_focus):
(ns_unfocus): Handle drawing to offscreen buffer.
(ns_clip_to_row): Use ns_row_rect.
(ns_copy_bits): Remove unused function.
(ns_scroll_run):
(ns_shift_glyphs_for_insert): Use new scrolling method.
(ns_draw_fringe_bitmap):
(ns_dumpglyphs_image): When drawing to the offscreen buffer, flip
images so they appear the right way up.
(ns_dumpglyphs_stretch): Remove unnecessary code.
(ns_draw_window_cursor): Don't disable screen updates.
([EmacsView updateFrameSize:]): Update the size of the offscreen
buffer.
([EmacsView initFrameFromEmacs:]): Create offscreen buffer.
([EmacsView windowDidChangeBackingProperties:]):
([EmacsView createDrawingBufferWithRect:]):
([EmacsView focusOnDrawingBuffer]):
([EmacsView copyRect]): New methods.
([EmacsView viewWillDraw]): Remove method as it no longer does
anything useful.
([EmacsView drawRect:]): Handle drawing from offscreen buffer.
src/nsfns.m
src/nsterm.h
src/nsterm.m