/[gzz]/gzz/doc/Gzz_Memory.rst
ViewVC logotype

Diff of /gzz/doc/Gzz_Memory.rst

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by tjl, Sat Jan 11 11:37:57 2003 UTC revision 1.12 by tjl, Mon Jan 13 06:48:49 2003 UTC
# Line 99  we should have the different loadable ty Line 99  we should have the different loadable ty
99          methods          methods
100              boolean getScalable()              boolean getScalable()
101              int getMaxBytes(float quality)              int getMaxBytes(float quality)
102              void setReservation(int bytes, float quality, Obs o)              int setReservation(int bytes, float quality, Obs o)
103              int getReservation()              int getReservation()
104    
105      class client      class client
# Line 119  the system may query it for the maximum Line 119  the system may query it for the maximum
119  the number of bytes can be scaled, and set the current memory consumption  the number of bytes can be scaled, and set the current memory consumption
120  to a particular amount.  to a particular amount.
121    
122    Defining the importance function is not simple; this represents the
123    tradeoffs between memory use for the focus and context.  The first,
124    obvious quality is that the most immediate focus has priority: it must
125    never be blurred to make the context sharper.  In the other end of the
126    scale are the spans that are not really visible but might become visible
127    when the user moves; these should only be loaded if there's extra memory
128    available.
129    
130    The cases between the two extremes are the difficult ones.
131    
132    
133    Need to be able to handle case of 1 focus-request for A
134    + 100 low-quality non-focus requests for B
135    IN A SINGLE VOBSCENE.
136    
137    
138    
139    
140  As an example of how this system will be tied to the rest of Gzz,  As an example of how this system will be tied to the rest of Gzz,
141  consider PageSpans and OpenGL. The basic operation is: "get a texture  consider PageSpans and OpenGL. The basic operation is: "get a texture
142  rectangle for the given pagespan". In order to have the information about  rectangle for the given pagespan". In order to have the information about
# Line 191  another parameter, the importance, when Line 209  another parameter, the importance, when
209      gzz.mem.se = MemoryConsumer.se + (30, -30);      gzz.mem.se = MemoryConsumer.se + (30, -30);
210    
211    
212  Defining the importance function is not simple; this represents the  The loading of a texture from an image file is an intricate process:
213  tradeoffs between memory use for the focus and context.  The first,  first, the image is loaded into a memory buffer in a background thread.
214  obvious quality is that the most immediate focus has priority: it must  Then, the image must be loaded from the buffer to the OpenGL graphics memory -
215  never be blurred to make the context sharper.  In the other end of the  but herein lies a snag: this loading must be done in the OpenGL context,
216  scale are the spans that are not really visible but might become visible  which is usable only in the main thread, and also this loading may take
217  when the user moves; these should only be loaded if there's extra memory  considerable time if texture compression is used.
218  available.  Thus, the loading will be done piecemeal, subimage by subimage, and always in between
219    new events are checked for.
 The cases between the two extremes are the difficult ones.  
   
   
 Need to be able to handle case of 1 focus-request + 100 low-quality non-focus requests  
 IN A SINGLE VOBSCENE.  
   
220    
221    

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26