Commits
- Commit:
92e092efe6c6b2a6b6ec9da33170317d4426cab0- From:
- Christoph Lohmann <20h@r-36.net>
- Date:
Commit to push the 0.6 release.
- Commit:
5f48e89716a74e75b6040fdb067372180626b699- From:
- Weng Xuetian <wengxt@gmail.com>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
Revert "Remove unnecessary XFilterEvent call."
This reverts commit d2937b05aed9cee8d6651cd806d31682a853c773.
- Commit:
bdd649a10289ade364f3deab3bbf6ee3169d67ca- From:
- Quentin Rameau <quinq@quinq.eu.org>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
do not truncate font size when zooming
- Commit:
71fa10f613a22b3e75e0e897ee1be6667be3f449- From:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
Revert "Optimize memory footprint of line buffers"
This reverts commit 7ab6c92e18d468968811256e808b02309c160a22.
We need 32 bits for real color support.
- Commit:
caa97cc781ccf29f28c3d9e6683a66eb3f70e2bd- From:
- Jan Christoph Ebersbach <jceb@e-jc.de>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
Support UTF-8 characters as word delimiters
For a higher usefulness of the utf8strchr function, the index of the
UTF-8 character could be returned in addition with a Rune instead of a
char*. Since utf8strchr is currently only used by ISDELIM I didn't
bother to increase the complexity.
- Commit:
c03548750b2527a6ddb5edfd945c5799066a6224- From:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
Merge branch 'master' of ssh://suckless.org/gitrepos/st
- Commit:
8e15887de95a7076b9515dcbb428b364f6dc3849- From:
- v4hn <me@v4hn.de>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
set selection to IDLE on clear
Otherwise a tangling bmotion event will consider
the selection still valid and selnormalize segfaults
because of an invalid sel.ob.y index.
- Commit:
980991fa6e7b737d54f8e5c60c26275890eb28ff- From:
- Christoph Lohmann <20h@r-36.net>
- Date:
Fix the new -e handling. An empty cmd has to work for backwards compatibility.
- Commit:
89cf0fc597a2bcc16b1516c6f6d750a06175f1c7- From:
- suigin <suigin@national.shitposting.agency>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
Small bugfix for makeglyphfontspecs call in drawregion
Here's a patch that fixes a bug when calling `makedrawglyphfontspecs'
in `drawregion'. Wasn't offseting the pointer into the input glyphs
array by `x1'. The bug isn't causing any problems currently, because
`drawregion' is always called with `x1' and `y1' values of 0, but if
this ever changes in the future, the bug would certainly cause some
problems.
- Commit:
ae1923d27533ff46400d93765e971558201ca1ee- From:
- suigin <suigin@national.shitposting.agency>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
Clean up xdraws and optimize glyph drawing with non-unit kerning values
I have another patch here for review that optimizes the performance of
glyph drawing, primarily when using non-unit kerning values, and fixes a
few other minor issues. It's dependent on the earlier patch from me that
stores unicode codepoints in a Rune type, typedef'd to uint_least32_t.
This patch is a pretty big change to xdraws so your scrutiny is
appreciated.
First, some performance numbers. I used Yu-Jie Lin termfps.sh shell
script to benchmark before and after, and you can find it in the
attachments. On my Kaveri A10 7850k machine, I get the following
results:
Before Patch
============
1) Font: "Liberation Mono:pixelsize=12:antialias=false:autohint=false"
cwscale: 1.0, chscale: 1.0
For 273x83 100 frames.
Elapsed time : 1.553
Frames/second: 64.352
Chars /second: 1,458,159
2) Font: "Inconsolata:pixelsize=14:antialias=true:autohint=true"
cwscale: 1.001, chscale: 1.001
For 239x73 100 frames.
Elapsed time : 159.286
Frames/second: 0.627
Chars /second: 10,953
After Patch
===========
3) Font: "Liberation Mono:pixelsize=12:antialias=false:autohint=false"
cwscale: 1.0, chscale: 1.0
For 273x83 100 frames.
Elapsed time : 1.544
Frames/second: 64.728
Chars /second: 1,466,690
4) Font: "Inconsolata:pixelsize=14:antialias=true:autohint=true"
cwscale: 1.001, chscale: 1.001
For 239x73 100 frames.
Elapsed time : 1.955
Frames/second: 51.146
Chars /second: 892,361
As you can see, while the improvements for fonts with unit-kerning is
marginal, there's a huge ~81x performance increase with the patch when
using kerning values other than 1.0.
So what does the patch do?
The `xdraws' function would render each glyph one at a time if non-unit
kerning values were configured, and this was the primary cause of the
slow down. Xft provides a handful of functions which allow you to render
multiple characters or glyphs at time, each with a unique <x,y> position,
so it was simply a matter of massaging the data into a format that would
allow us to use one of these functions.
I've split `xdraws' up into two functions. In the first pass with
`xmakeglyphfontspecs' it will iterate over all of the glyphs in a given
row and it will build up an array of corresponding XftGlyphFontSpec
records. Much of the old logic for resolving fonts for glyphs using Xft
and fontconfig went into this function.
The second pass is done with `xrenderglyphfontspecs' which contains the
old logic for determining colors, clearing the background, and finally
rendering the array of XftGlyphFontSpec records.
There's a couple of other things that have been improved by this patch.
For instance, the UTF-32 codepoints in the Line's were being re-encoded
back into UTF-8 strings to be passed to `xdraws' which in turn would then
decode back to UTF-32 to verify that the Font contained a matching glyph
for the code point. Next, the UTF-8 string was being passed to
`XftDrawStringUtf8' which internally mallocs a scratch buffer and decodes
back to UTF-32 and does the lookup of the glyphs all over again.
This patch gets rid of all of this redundant round-trip encoding and
decoding of characters to be rendered and only looks up the glyph index
once (per font) during the font resolution phase. So this is probably
what's responsible for the marginal improvements seen when kerning values
are kept to 1.0.
I imagine there are other performance improvements here too, not seen in
the above benchmarks, if the user has lots of non-ASCII code plane characters
on the screen, or several different fonts are being utilized during
screen redraw.
Anyway, if you see any problems, please let me know and I can fix them.
- Commit:
38af006b5e4a36c77f25affbb3f7e28899db75ed- From:
- suigin <suigin@national.shitposting.agency>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
Changed type for UTF-32 codepoints from long to uint_least32_t
- Commit:
c990abfedf56cb8d3176fe6d5152ff65bb68bff0- From:
- noname <noname@inventati.org>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
Fix empty selection highlighting bug.
When user clicks LMB, one character is selected, but will not be copied
to selection until the user moves cursor a bit. Therefore, the character
should not be highlighted as selected yet.
Before the patch, the trick was not to mark line as dirty to avoid
highlighting it. However, if user has already selected something and
clicks in line that contains selection, selclear sets the line as dirty
and one character is highlighted when it should not.
This patch replaces dirty trick with explicit check for sel.mode inside
selected().
- Commit:
3cb7f27afe89c33c74b51c5460b7fb16413f786b- From:
- noname <noname@inventati.org>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
Fix indentation.
- Commit:
1811b6030cd9ac6bb938449eef778c6f54ab0e49- From:
- noname <noname@inventati.org>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
Add enumeration for sel.mode
This patch also prevents sel.mode from increasing beyond 2. It is almost
impossible, but sel.mode may overflow if mouse is moved around for too
long while selecting.
- Commit:
22571ea4e8729efee6940b704666566b46e42e76- From:
- noname <noname@inventati.org>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
selnormalize: make special case explicit
Special case is when regular selection spans multiple lines.
Otherwise, just sort sel.ob.x and sel.ob.y.
- Commit:
8751809aff596fc2030026713651c11b3743f88e- From:
- noname <noname@inventati.org>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
selsnap: simplify SNAP_LINE case
Also make sure y never exceeds term.row-1 even if ATTR_WRAP is set for
some reason.
- Commit:
765bb0fd1420e36b04ecc03c18f01f5bda96c563- From:
- noname <noname@inventati.org>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
Remove first argument of selsnap.
- Commit:
07ce96a3a0f4a650933f5f586082cbf2064ea2c1- From:
- Jochen Sprickerhof <dwm@jochen.sprickerhof.de>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
Fix sigchld
Only wait for termination of the shell.
- Commit:
190b94c7a2a7bb2f5d55cbb6eb1779fd042c6467- From:
- mvdan@mvdan.cc <mvdan@mvdan.cc>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
len assignment is never used
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
- Commit:
4f21c41a1c19f769a2bf7941ee18fa0606266cca- From:
- mvdan@mvdan.cc <mvdan@mvdan.cc>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
Clarify calculation precedence for '&' and '?'
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
- Commit:
3a5053f6c19195df5fde84a7e5eb3217443bb9ab- From:
- mvdan@mvdan.cc <mvdan@mvdan.cc>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
Use %u for uint
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
- Commit:
7ab6c92e18d468968811256e808b02309c160a22- From:
- suigin <suigin@national.shitposting.agency>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
Optimize memory footprint of line buffers
- Commit:
0622ad9badefa985231ddede467d2bd8d94e93e4- From:
- noname@inventati.org <noname@inventati.org>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
Make tputc, tsetchar and techo accept unicode
- Commit:
21f765426c36991edd8b14f4989d66187e9ff597- From:
- noname@inventati.org <noname@inventati.org>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
Change internal character representation.
- Commit:
753fe862b14c7dd4b0449ab2c3bf22ecbb10030e- From:
- noname@inventati.org <noname@inventati.org>
- Via:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Date:
Remove last parameter of utf8encode
This parameter was always UTF_SIZ, so it is better remove it and
use directly UTF_SIZ in it.
