aboutsummaryrefslogtreecommitdiff
path: root/render.h (follow)
Commit message (Collapse)AuthorAgeLines
* render: throttle xcursor updatesDaniel Eklöf2020-01-04-1/+1
| | | | | | | | | | | | | | | | | | | | | | | With a bad behaving client (e.g. 'less' with mouse support enabled), we can end up with a *lot* of xcursor updates (so much, that we flooded the wayland socket before we implemented a blocking wayl_flush()). Since there's little point in updating the cursor more than once per frame interval, use frame callbacks to throttle the updates. This works more or lesslike normal terminal refreshes: render_xcursor_set() stores the last terminal (window) that had (and updated) the cursor. The renderer's FDM hook checks if we have such a pending terminal set, and if so, tries to refresh the cursor. This is done by first checking if we're already waiting for a callback from a previous cursor update, and if so we do nothing; the callback will update the cursor for the next frame. If we're *not* already waiting for a callback, we update the cursor immediately.
* render: trigger terminal refreshes in an FDM hookDaniel Eklöf2020-01-04-2/+5
| | | | | | | | | | | | | | | | | | | | | | In some cases, we end up calling render_refresh() multiple times in the same FDM iteration. This means will render the first update immediately, and then set the 'pending' flag, causing the updated content to be rendered in the next frame. This can cause flicker, or flashes, since we're presenting one or more intermediate frames until the final content is shown. Not to mention that it is inefficient to render multiple frames like this. Fix by: * render_refresh() only sets a flag in the terminal * install an FDM hook; this hook loops all terminals and executes what render_refresh() _used_ to do (that is, render immediately if we're not waiting for a frame callback, otherwise set 'pending' flag). for all terminals that have the 'refresh_needed' flag set.
* render: remove 'refresh' from render_resize()Daniel Eklöf2020-01-03-1/+1
|
* render: resize() now only calls refresh() if asked toDaniel Eklöf2020-01-03-1/+1
|
* render: attrs_to_font: const:ifyDaniel Eklöf2019-12-19-1/+1
|
* wayland: move reload_cursor_theme() and update_cursor_surface() to waylandDaniel Eklöf2019-10-27-2/+0
|
* search: move render() function to the 'render' moduleDaniel Eklöf2019-08-29-0/+1
|
* render: reload cursor theme when scale (may) have changedDaniel Eklöf2019-08-21-1/+3
|
* output: track output we're mapped on, and use maximum scaleDaniel Eklöf2019-08-12-1/+1
| | | | | | Our surface may be on multiple outputs at the same time. In this case, we use the largest scale factor, and let the compositor down scale on the "other" output(s).
* output: resize on scale changesDaniel Eklöf2019-08-12-1/+1
|
* wip: initial multithreaded rendererDaniel Eklöf2019-07-29-0/+6
|
* render: add render_refresh()Daniel Eklöf2019-07-24-0/+1
|
* render: cache generated glyphs for regular ASCII charactersDaniel Eklöf2019-07-18-1/+1
| | | | | | | | To avoid having to re-generate glyphs, cache the glyphs. For now, we only cache ASCII characters, as this allows us to lookup the cache by simply indexing with the character (into a 256-entry array).
* render: implement 'underline'Daniel Eklöf2019-07-16-1/+1
|
* render: load cursor theme from XCURSOR_THEME and XCURSOR_SIZEDaniel Eklöf2019-07-05-0/+1
|
* render: break out rendering functions to render.{c,h}Daniel Eklöf2019-07-05-0/+10