Re: Cullng drawing depending on visibility events
- From: Owen Taylor <otaylor redhat com>
- To: Keith Packard <keithp keithp com>
- Cc: Soeren Sandmann <sandmann daimi au dk>, Federico Mena Quintero <federico ximian com>, gtk-devel-list gnome org
- Subject: Re: Cullng drawing depending on visibility events
- Date: 04 Apr 2003 11:27:57 -0500
Just to follow up to myself with some further thoughts.
Define:
Rv: Portion of window visible to the user
Rs: Portion of window that the X server has maintained the contents for
For ultimate efficiency, GTK+ would really like to get
notification of both additions and subtractions to these
regions.
Then, you can use the following algorithm on the client
side; let:
Ri - region that GTK+ will repaint on idle
Rsi - "stored invalid region"
R'v ,R's - client side representation of Rv and Rs
(Assume that the notifications are sent ordered so
that Rv is always a proper subset of Rs)
gdk_window_invalidate_region (r)
Add Intersection(r, R'v) to Ri
Add Intersection(r, R's - R'v) to Rsi
Notification of addition of region 'r' to Rv:
Add r to R'v
Add Intersection(r,Rsi) to Ri
Remove r from Rsi
Notification of removal of region 'r' from Rv:
Remove r from R'v
Add Intersection of (r,Ri) to Rsi
Remove r from Ri
Notification of addition of region 'r' to Rs:
Add r to R's
Add r to Rsi
Notification of removal of region 'r' from Rs:
Remove r from R's
Remove r from Ri
Remove r from Rsi
Idle repaint:
Generate paint event for Ri, Clear Ri.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]