Around 19 o'clock on Jan 25, Seer wrote:
> How does the server handle caching identical glyph masks? > I dont think it can memcmp them And why not? That's what it does. Of course, it uses a hash to avoid comparing very many. This has the significant advantage of sharing identical glyphs, even when the client doesn't know they're identical. > When rasterizing a rotated glyph, is it efficient to specify > different rotations for individual glyphs within a single > font? Yes, you can open the same font many times with different rotations; there will be a small overhead for the glyphset structure within the server, and a small overhead for the XftFont structure on the client, but otherwise the impact is modest. In particular, the underlying FreeType objects will be shared, and of course only the used glyphs will be rasterized. The abstraction doesn't support changing the transformation for each glyph, and I don't think it's a common enough case to require specific optimization. > The last question is: if every app is doing rasterization, > its seems that alot of duplicate work is being done. A > daemon with a version of Xft font manager could be running > which did the rasterizition and caching. Yes, that's true, and the Render extension has hooks to support such sharing, but implementing it in practise will be difficult as you want to avoid a round trip to any server to get the metrics -- that means some kind of shared memory mechanism which is fraught with security and stability perils. Fortunately, rasterizing glyphs is not expensive, especially given modern machines, and also Xft rasterizes glyphs on demand, so the overhead is amortized over a longer time scale than the core X font mechanism. The short answer is that the current mechanism balances the cost of rasterization with the overhead of communicating with a central server and, at this point, the performance of the local solution is enough better to justify any possible perceived duplication of effort. > Imagine having 20 windows open and the titlebar font is exotic kanjis that > each app is rasterizing them separatly There's not enough glyphs in that example to be worth bothering about; a better example is multiple applications viewing similar documents that contain large numbers of identical glyphs. Remember that adding another daemon to the mix will only serve to reduce overall system reliability. Keith Packard XFree86 Core Team Compaq Cambridge Research Lab _______________________________________________ Render mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/render
