Mercurial > hg > xemacs-beta
comparison src/glyphs.c @ 3092:141c2920ea48
[xemacs-hg @ 2005-11-25 01:41:31 by crestani]
Incremental Garbage Collector
author | crestani |
---|---|
date | Fri, 25 Nov 2005 01:42:08 +0000 |
parents | 1e7cc382eb16 |
children | 229bd619740a |
comparison
equal
deleted
inserted
replaced
3091:c22d8984148c | 3092:141c2920ea48 |
---|---|
4538 the repainting necessary. Worse, we can get in an endless cycle of | 4538 the repainting necessary. Worse, we can get in an endless cycle of |
4539 redisplay if we are not careful. Thus we keep a per-frame list of | 4539 redisplay if we are not careful. Thus we keep a per-frame list of |
4540 expose events that are going to come and ignore them as | 4540 expose events that are going to come and ignore them as |
4541 required. */ | 4541 required. */ |
4542 | 4542 |
4543 #ifndef NEW_GC | |
4543 struct expose_ignore_blocktype | 4544 struct expose_ignore_blocktype |
4544 { | 4545 { |
4545 Blocktype_declare (struct expose_ignore); | 4546 Blocktype_declare (struct expose_ignore); |
4546 } *the_expose_ignore_blocktype; | 4547 } *the_expose_ignore_blocktype; |
4548 #endif /* not NEW_GC */ | |
4547 | 4549 |
4548 int | 4550 int |
4549 check_for_ignored_expose (struct frame* f, int x, int y, int width, int height) | 4551 check_for_ignored_expose (struct frame* f, int x, int y, int width, int height) |
4550 { | 4552 { |
4551 struct expose_ignore *ei, *prev; | 4553 struct expose_ignore *ei, *prev; |
4572 prev->next = ei->next; | 4574 prev->next = ei->next; |
4573 | 4575 |
4574 if (ei == f->subwindow_exposures_tail) | 4576 if (ei == f->subwindow_exposures_tail) |
4575 f->subwindow_exposures_tail = prev; | 4577 f->subwindow_exposures_tail = prev; |
4576 | 4578 |
4579 #ifdef NEW_GC | |
4580 mc_free (ei); | |
4581 #else /* not NEW_GC */ | |
4577 Blocktype_free (the_expose_ignore_blocktype, ei); | 4582 Blocktype_free (the_expose_ignore_blocktype, ei); |
4583 #endif /* not NEW_GC */ | |
4578 return 1; | 4584 return 1; |
4579 } | 4585 } |
4580 prev = ei; | 4586 prev = ei; |
4581 } | 4587 } |
4582 return 0; | 4588 return 0; |
4587 { | 4593 { |
4588 if (!hold_ignored_expose_registration) | 4594 if (!hold_ignored_expose_registration) |
4589 { | 4595 { |
4590 struct expose_ignore *ei; | 4596 struct expose_ignore *ei; |
4591 | 4597 |
4598 #ifdef NEW_GC | |
4599 ei = alloc_lrecord_type (struct expose_ignore, &lrecord_expose_ignore); | |
4600 #else /* not NEW_GC */ | |
4592 ei = Blocktype_alloc (the_expose_ignore_blocktype); | 4601 ei = Blocktype_alloc (the_expose_ignore_blocktype); |
4602 #endif /* not NEW_GC */ | |
4593 | 4603 |
4594 ei->next = NULL; | 4604 ei->next = NULL; |
4595 ei->x = x; | 4605 ei->x = x; |
4596 ei->y = y; | 4606 ei->y = y; |
4597 ei->width = width; | 4607 ei->width = width; |
5428 } | 5438 } |
5429 | 5439 |
5430 void | 5440 void |
5431 reinit_vars_of_glyphs (void) | 5441 reinit_vars_of_glyphs (void) |
5432 { | 5442 { |
5443 #ifndef NEW_GC | |
5433 the_expose_ignore_blocktype = | 5444 the_expose_ignore_blocktype = |
5434 Blocktype_new (struct expose_ignore_blocktype); | 5445 Blocktype_new (struct expose_ignore_blocktype); |
5446 #endif /* not NEW_GC */ | |
5435 | 5447 |
5436 hold_ignored_expose_registration = 0; | 5448 hold_ignored_expose_registration = 0; |
5437 } | 5449 } |
5438 | 5450 |
5439 | 5451 |