libera/#clim - IRC Chatlog
Search
9:09:07
jackdaniel
I've been able to implement a proof of concept transformations of draw-text, and the speed jumped (in the benchmark) from 8 screens / s to 3200 screens / s, so the approach is sound; that said it seems I've triggered some memory leak that allocates x11 resources without releasing them, so after a while the thing goes kaputt along with the whole windowing, so I'm investigating that
9:09:28
jackdaniel
transformation by changing the stencil's picture transformation that is (instead of rendering transformed glyphs)
9:51:22
jackdaniel
another concern -- transforming the picture with rendered text is prone to quality loss, especially with scaling
9:52:58
jackdaniel
but I think that this is ~acceptable, without scaling it is not visible on 4k monitor, and on 1080p it is negligible; on the other hand redoing glyphs for each transformation is slow (400x slower in fact), and caching is unfeasible - consider the demo where we rotate the text - each new transformation would generate a new glyph set
9:53:36
jackdaniel
perhaps there's some middle ground (at least for scaling), where we find the closest size-wise /already cached/ glyphset and work from there
9:54:14
jackdaniel
or perhaps we could get a little fancy and have the stencil have a higher resolution than the window
14:52:56
beach
scymtym: Why is is that when I load Clouseau, there are 30 or so warnings of things being redefined?
14:58:56
jackdaniel
clouseau did not change for quite long time, so if you've recently pulled mcclim respository, and these warnings are new to you (i.e they were not present earlier), then it is all mcclim
15:01:52
beach
No, I mean, I can't tell whether the warnings come from loading McCLIM or from loading Clouseau.
15:03:42
beach
mark-isibility, alocate-medium, deallocate-medium, make-medium, engraft-medium, degraft-medium, port, graft, pane-needs-redisplay, ...
15:17:48
beach
Should I give a complete list, or is this a known issue? Or perhaps I am doing something wrong?
15:22:32
jackdaniel
I'm aware of some of these and I know how to reproduce; I don't think that you are doing something wrong
15:25:42
jackdaniel
so, back on font rendering; to correctly displace the rendered text onto a stencil and compose it over the target, we need to render it untransformed at (0 0), and then add an appropriate transformation to the picture
15:26:15
jackdaniel
we can't reliably untransform the target, because some drawing may fall outside of the stencil's mirror
15:26:51
jackdaniel
rendering at (0 0) is (unfortunately) a simplification, we need to account for the font ascent and for the left-bearing of the first character, because the target clipping does not apply anymore
15:27:43
jackdaniel
as a side benefit, we'll be able now to render text which has x,y outside of the clx coordiante range, and the visible part will be rendered correctly (a known issue)
15:28:50
jackdaniel
sounds like a hassle (and it is), but the first approach I've taken (untransforming the target, then accounting for the offset if it falls outside of the valid mirror that is in the second quadrant, was much uglier than the approach outlined above
15:58:04
scymtym
beach: i should probably update clouseau for other reasons, but yeah, there shouldn't be that many warnings from clouseau
16:51:03
scymtym
beach: i understood. i just meant that i have probably accumulated a few useful changes over time that are not published