<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/src, branch scratch/ns/performance</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Change pixel format</title>
<updated>2020-12-31T15:38:08+00:00</updated>
<author>
<name>Alan Third</name>
</author>
<published>2020-12-28T10:40:50+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=6312a8e9382105196fdf1edddfc68a678acd673e'/>
<id>6312a8e9382105196fdf1edddfc68a678acd673e</id>
<content type='text'>
* src/nsterm.m ([EmacsSurface getContext]): Use BGRA for the IOSurface
and specify the CGContext explicitly for compatibility with a wider
range of Macs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/nsterm.m ([EmacsSurface getContext]): Use BGRA for the IOSurface
and specify the CGContext explicitly for compatibility with a wider
range of Macs.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix EmacsSurface definitions</title>
<updated>2020-12-31T15:38:08+00:00</updated>
<author>
<name>Alan Third</name>
</author>
<published>2020-12-21T19:49:04+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=aeb2475816bfdf7e52284fedf693d3f36940652a'/>
<id>aeb2475816bfdf7e52284fedf693d3f36940652a</id>
<content type='text'>
* src/nsterm.h:
* src/nsterm.m ([EmacsSurface initWithSize:ColorSpace:]): Objective C
init methods should init the superclass, and return id.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/nsterm.h:
* src/nsterm.m ([EmacsSurface initWithSize:ColorSpace:]): Objective C
init methods should init the superclass, and return id.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix GNUstep warnings</title>
<updated>2020-12-31T15:38:08+00:00</updated>
<author>
<name>Alan Third</name>
</author>
<published>2020-12-19T20:46:55+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=77a07a2f8d16e4f3fa8e0ae23b4349919226ce8b'/>
<id>77a07a2f8d16e4f3fa8e0ae23b4349919226ce8b</id>
<content type='text'>
* src/nsterm.h: EmacsSurface is only required if NS_DRAW_TO_BUFFER is
defined.
* src/nsterm.m (ns_judge_scroll_bars): Remove unused variable.
* src/nsmenu.m (update_frame_tool_bar):
(ns_update_menubar): Remove unused variables.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/nsterm.h: EmacsSurface is only required if NS_DRAW_TO_BUFFER is
defined.
* src/nsterm.m (ns_judge_scroll_bars): Remove unused variable.
* src/nsmenu.m (update_frame_tool_bar):
(ns_update_menubar): Remove unused variables.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix problems with reusing IOSurfaces</title>
<updated>2020-12-31T15:38:07+00:00</updated>
<author>
<name>Alan Third</name>
</author>
<published>2020-12-19T01:19:32+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=690bb687f6f2026e42b878be5fe243c4562e2427'/>
<id>690bb687f6f2026e42b878be5fe243c4562e2427</id>
<content type='text'>
* src/nsterm.h: New EmacsSurface class and update EmacsView
definitions.
* src/nsterm.m ([EmacsView dealloc]):
([EmacsView viewDidResize:]): Handle new EmacsSurface class.
([EmacsView initFrameFromEmacs:]): Remove reference to old method.
([EmacsView createDrawingBuffer]): Remove method.
([EmacsView focusOnDrawingBuffer]):
([EmacsView unfocusDrawingBuffer]):
([EmacsView windowDidChangeBackingProperties:]): Use new EmacsSurface
class.
([EmacsView copyRect:to:]): Get information from the context instead
of direct from the IOSurface.
([EmacsView updateLayer]): Use new EmacsSurface class.
([EmacsSurface initWithSize:ColorSpace:]):
([EmacsSurface dealloc]):
([EmacsSurface getSize]):
([EmacsSurface getContext]):
([EmacsSurface releaseContext]):
([EmacsSurface getSurface]):
([EmacsSurface copyContentsTo:]): New class and methods.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/nsterm.h: New EmacsSurface class and update EmacsView
definitions.
* src/nsterm.m ([EmacsView dealloc]):
([EmacsView viewDidResize:]): Handle new EmacsSurface class.
([EmacsView initFrameFromEmacs:]): Remove reference to old method.
([EmacsView createDrawingBuffer]): Remove method.
([EmacsView focusOnDrawingBuffer]):
([EmacsView unfocusDrawingBuffer]):
([EmacsView windowDidChangeBackingProperties:]): Use new EmacsSurface
class.
([EmacsView copyRect:to:]): Get information from the context instead
of direct from the IOSurface.
([EmacsView updateLayer]): Use new EmacsSurface class.
([EmacsSurface initWithSize:ColorSpace:]):
([EmacsSurface dealloc]):
([EmacsSurface getSize]):
([EmacsSurface getContext]):
([EmacsSurface releaseContext]):
([EmacsSurface getSurface]):
([EmacsSurface copyContentsTo:]): New class and methods.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve performance of scrolling on NS</title>
<updated>2020-12-31T15:38:07+00:00</updated>
<author>
<name>Alan Third</name>
</author>
<published>2020-12-17T14:18:56+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=ee74dc593b02f4fe8ee234c9ce80b389d682089c'/>
<id>ee74dc593b02f4fe8ee234c9ce80b389d682089c</id>
<content type='text'>
* src/nsterm.m ([EmacsView copyRect:to:]): Use memcpy to copy bits
around instead of using NS image functions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/nsterm.m ([EmacsView copyRect:to:]): Use memcpy to copy bits
around instead of using NS image functions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve drawing performance on macOS</title>
<updated>2020-12-31T15:38:07+00:00</updated>
<author>
<name>Alan Third</name>
</author>
<published>2020-12-16T21:12:04+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=9be0f082fb6ba81abd7a7cf0c926686df78c8ae4'/>
<id>9be0f082fb6ba81abd7a7cf0c926686df78c8ae4</id>
<content type='text'>
* configure.ac: Require IOSurface framework.
* src/nsterm.h: Add new definitions.
* src/nsterm.m (ns_update_end):
(ns_unfocus): Use new unfocusDrawingBuffer method.
(ns_draw_window_cursor): Move ns_focus to before we set colors.
([EmacsView dealloc]): Release the new IOSurface.
([EmacsView createDrawingBuffer]): Use a new IOSurface to draw to
and point a CGBitmapContext to it.
([EmacsView focusOnDrawingBuffer]): Lock the IOSurface for drawing.
([EmacsView unfocusDrawingBuffer]): New function.
([EmacsView updateLayer]): Use the IOSurface.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* configure.ac: Require IOSurface framework.
* src/nsterm.h: Add new definitions.
* src/nsterm.m (ns_update_end):
(ns_unfocus): Use new unfocusDrawingBuffer method.
(ns_draw_window_cursor): Move ns_focus to before we set colors.
([EmacsView dealloc]): Release the new IOSurface.
([EmacsView createDrawingBuffer]): Use a new IOSurface to draw to
and point a CGBitmapContext to it.
([EmacsView focusOnDrawingBuffer]): Lock the IOSurface for drawing.
([EmacsView unfocusDrawingBuffer]): New function.
([EmacsView updateLayer]): Use the IOSurface.
</pre>
</div>
</content>
</entry>
<entry>
<title>Minor cleanup in doc.c</title>
<updated>2020-12-31T09:27:20+00:00</updated>
<author>
<name>Stefan Kangas</name>
</author>
<published>2020-12-30T19:52:43+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=46c4bcd3927d47b1d694d80087041ef0c0112477'/>
<id>46c4bcd3927d47b1d694d80087041ef0c0112477</id>
<content type='text'>
* src/doc.c (get_doc_string, Fdocumentation)
(Fdocumentation_property, store_function_docstring):
Minor cleanup.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/doc.c (get_doc_string, Fdocumentation)
(Fdocumentation_property, store_function_docstring):
Minor cleanup.
</pre>
</div>
</content>
</entry>
<entry>
<title>Minor improvements to FD_SETSIZE overflow checks.</title>
<updated>2020-12-30T23:31:21+00:00</updated>
<author>
<name>Philipp Stephani</name>
</author>
<published>2020-12-30T21:36:07+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=0eef70aea892a5b783623a948808b5bc1131c8e0'/>
<id>0eef70aea892a5b783623a948808b5bc1131c8e0</id>
<content type='text'>
* src/process.c (Fmake_serial_process): Add port to error data.
(connect_network_socket): Add an explanatory comment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/process.c (Fmake_serial_process): Add port to error data.
(connect_network_socket): Add an explanatory comment.
</pre>
</div>
</content>
</entry>
<entry>
<title>Manually limit file descriptors that we select on to FD_SETSIZE.</title>
<updated>2020-12-30T23:18:02+00:00</updated>
<author>
<name>Philipp Stephani</name>
</author>
<published>2020-12-30T22:43:07+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=8bc85d46cc9214a531f2d2ecb3f5fb48af8105a6'/>
<id>8bc85d46cc9214a531f2d2ecb3f5fb48af8105a6</id>
<content type='text'>
This works even if another thread or process resets the resource limit
for open file descriptors, e.g., using 'prlimit' on GNU/Linux.

* src/process.c (create_process, create_pty, Fmake_pipe_process)
(Fmake_serial_process, connect_network_socket)
(server_accept_connection): Limit file descriptors to FD_SETSIZE.
* test/src/process-tests.el (process-tests--with-raised-rlimit): New
helper macro.
(process-tests--fd-setsize-test): Rename from
'process-tests--with-many-pipes'.  Increase resource limit during test
if possible.
(process-tests/fd-setsize-no-crash/make-process)
(process-tests/fd-setsize-no-crash/make-pipe-process)
(process-tests/fd-setsize-no-crash/make-network-process)
(process-tests--new-pty): Rename callers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This works even if another thread or process resets the resource limit
for open file descriptors, e.g., using 'prlimit' on GNU/Linux.

* src/process.c (create_process, create_pty, Fmake_pipe_process)
(Fmake_serial_process, connect_network_socket)
(server_accept_connection): Limit file descriptors to FD_SETSIZE.
* test/src/process-tests.el (process-tests--with-raised-rlimit): New
helper macro.
(process-tests--fd-setsize-test): Rename from
'process-tests--with-many-pipes'.  Increase resource limit during test
if possible.
(process-tests/fd-setsize-no-crash/make-process)
(process-tests/fd-setsize-no-crash/make-pipe-process)
(process-tests/fd-setsize-no-crash/make-network-process)
(process-tests--new-pty): Rename callers.
</pre>
</div>
</content>
</entry>
<entry>
<title>Consistently check for FD_SETSIZE overflow.</title>
<updated>2020-12-30T22:04:34+00:00</updated>
<author>
<name>Philipp Stephani</name>
</author>
<published>2020-12-30T21:33:22+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=0ea7bb3578998ebdf7c4903e7f38a8abf2e41b68'/>
<id>0ea7bb3578998ebdf7c4903e7f38a8abf2e41b68</id>
<content type='text'>
Previously this was only checked in a few places.  Now assert that
file descriptors are within the expected range whenever we'd otherwise
introduce undefined behavior.

* src/process.c (add_read_fd, add_process_read_fd, delete_read_fd)
(recompute_max_desc, delete_write_fd, compute_input_wait_mask)
(compute_non_process_wait_mask, compute_non_keyboard_wait_mask)
(compute_write_mask, clear_waiting_thread_info)
(update_processes_for_thread_death, Fset_process_thread)
(create_process, create_pty, Fmake_pipe_process)
(Fprocess_datagram_address, Fset_process_datagram_address)
(Fmake_serial_process, finish_after_tls_connection)
(connect_network_socket, deactivate_process)
(server_accept_connection, wait_reading_process_output)
(read_process_output, read_and_dispose_of_process_output)
(send_process, Fcontinue_process, Fprocess_send_eof)
(Fprocess_filter_multibyte_p, keyboard_bit_set)
(add_timer_wait_descriptor, setup_process_coding_systems): Add
assertions to document and check that file descriptors are within the
expected range when used as file descriptor set elements or array
subscripts.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously this was only checked in a few places.  Now assert that
file descriptors are within the expected range whenever we'd otherwise
introduce undefined behavior.

* src/process.c (add_read_fd, add_process_read_fd, delete_read_fd)
(recompute_max_desc, delete_write_fd, compute_input_wait_mask)
(compute_non_process_wait_mask, compute_non_keyboard_wait_mask)
(compute_write_mask, clear_waiting_thread_info)
(update_processes_for_thread_death, Fset_process_thread)
(create_process, create_pty, Fmake_pipe_process)
(Fprocess_datagram_address, Fset_process_datagram_address)
(Fmake_serial_process, finish_after_tls_connection)
(connect_network_socket, deactivate_process)
(server_accept_connection, wait_reading_process_output)
(read_process_output, read_and_dispose_of_process_output)
(send_process, Fcontinue_process, Fprocess_send_eof)
(Fprocess_filter_multibyte_p, keyboard_bit_set)
(add_timer_wait_descriptor, setup_process_coding_systems): Add
assertions to document and check that file descriptors are within the
expected range when used as file descriptor set elements or array
subscripts.
</pre>
</div>
</content>
</entry>
</feed>
