At 07:03 PM 2/10/00 -0800, Kirill 'Big K' Katsnelson wrote:
In real life this code is not reached unless glyphs changed, see
redisplay-output.c:(compare_runes)
else if (crb->type == RUNE_DGLYPH &&
XFRAME (w->frame)->glyphs_changed)
Note that this code is called on every redisplay, much much
more often than glyphs really change, and the glyph cache is
reset every so often.
Yes, Jan has already pointed out that this code needs optimising.
That way, the cache *almost* always contains only the internal
border glyphs. I walked this code with the debugger all the
way along and across, but have never seen a cachel for a lisp-
begot glyph in there.
When a glyph is to be output (see redisplay.c(add_glyph_rune)),
the cachel parameter, the last one, may be used or passed NULL.
For border glyphs, it is a real cachel. For lisp created
extent glyphs, it is always NULL.
Ok understand.
It seesm to me that the glyph cache fundamentally does not work
(or if it does the way it should then I fundamentally
misunderstand the logic behind it). I am going to look into it
soon.
Well the problem is that its original purpose was subverted by me for
subwindow support. Lets not duplicate work, I am actively hacking on this
stuff at the moment - much of the motivation behind the layout support I've
been hacking on is so that redisplay only displays widgets when it really
has to, and even then only the bits that have changed.
Anybody can remember, what was the initial concept of the dirty
flag of a glyph and of an image instance? This is a mess currently,
I wrote all this stuff. It is a mess, but necessary in order to make sure
redisplay doesn't re-output glyphs when it doesn't have to (causes lots of
nasty flashing with subwindows). Before there was a dirty flags, redisplay
used to assume a glyph had never changed or always changed, this doesn't
take into account more subtle changes like the glyph / image_instance
itself staying the same but some property changing (for instance the amount
a progress gauge is progressed). Now that widgets are updated more truly in
the spirit of redisplay it should be possible to clean this up somewhat.
as dirty flags are never reset for lisp-created glyphs, except -
a proposito - for widget glyphs.
Well widget glyphs are the ones that matter...
andy
BTW I have a feeling this started life as a private email.
--------------------------------------------------------------
Dr Andy Piper
Senior Consultant Architect, BEA Systems Ltd