/[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.6 by tjl, Tue Jan 7 12:27:04 2003 UTC revision 1.7 by tjl, Wed Jan 8 05:40:35 2003 UTC
# Line 22  with these. Line 22  with these.
22              float secToCreate              float secToCreate
23              float usage              float usage
24    
     simpler = assoc MemoryConsumer role(lowerqual) multi(*) - multi(1) MemoryConsumer  
25    
26      class Texture      class Texture
27          fields          fields
# Line 48  with these. Line 47  with these.
47      horizontally(50, tex, FullTexture, MosaicTexture);      horizontally(50, tex, FullTexture, MosaicTexture);
48      vertically(100, atex, Texture, tex);      vertically(100, atex, Texture, tex);
49      vertically(100, foo, MosaicTexture, MosaicTile);      vertically(100, foo, MosaicTexture, MosaicTile);
     simpler.p = MemoryConsumer.c{left} .. MemoryConsumer.c + (-150,150){1,1} .. MemoryConsumer.c{down};  
50    
51  Especially the relationship between MemoryConsumer, MosaicTexture and  Especially the relationship between MemoryConsumer, MosaicTexture and
52  MosaicTile is difficult: Textures consume a particular amount of memory,  MosaicTile is difficult: Textures consume a particular amount of memory,
# Line 100  we should have the different loadable ty Line 98  we should have the different loadable ty
98      class MemoryConsumer "interface"      class MemoryConsumer "interface"
99          methods          methods
100              boolean getScalable()              boolean getScalable()
101              int getMaxBytes()              int getMaxBytes(float quality)
102              void setReservation(int bytes, Obs o)              void setReservation(int bytes, float quality, Obs o)
103              int getReservation()              int getReservation()
104    
105      class client      class client
# Line 109  we should have the different loadable ty Line 107  we should have the different loadable ty
107    
108      class CacheFacade      class CacheFacade
109    
     class ImageLoader  
   
110      dep "enqueue, hash" CacheFacade MemoryConsumer      dep "enqueue, hash" CacheFacade MemoryConsumer
     dep "load" ImageLoader MemoryConsumer  
111      dep "create" client MemoryConsumer      dep "create" client MemoryConsumer
112    
113      ---      ---
114      horizontally(50, foo, client, CacheFacade, ImageLoader);      horizontally(50, foo, client, CacheFacade);
115      vertically(100, bar, MemoryConsumer, foo);      vertically(100, bar, MemoryConsumer, foo);
116    
117  The class ``MemoryConsumer`` abstracts a single memoryconsumer, where  The class ``MemoryConsumer`` abstracts a single memoryconsumer, where
# Line 131  the relative importances of the textures Line 126  the relative importances of the textures
126  another parameter, the importance, when getting the texture rectangle.  another parameter, the importance, when getting the texture rectangle.
127    
128  .. UML:: memorytexAPI  .. UML:: memorytexAPI
129    
130        jlinkpackage gzz.mem
131            
132      class GLSpans "staticAPI"      class GLSpanner "staticAPI"
133          methods          methods
134              TexRect get(PageSpan p, float importance, Obs o)              TexRect get(PageSpan p, float importance, Obs o)
135    
# Line 140  another parameter, the importance, when Line 137  another parameter, the importance, when
137          fields          fields
138              SinglePageSpan sp              SinglePageSpan sp
139    
140      assoc pagequal multi(1) - multi(0..1) TextureImageMemoryConsumer      assoc pagequal compos multi(1) - multi(0..1) TextureImageMemoryConsumer
141    
142        dep "use" GLSpanner MemoryPartitioner
143    
     class MemoryConsumer  
144    
145      class TextureImageMemoryConsumer      class TextureImageMemoryConsumer
146          inherit MemoryConsumer          inherit MemoryConsumer
147            methods
148                TexRect getTexRect(Obs o)
149    
150        bigpackage gzz.mem
151    
152        class MemoryPartitioner
153            jlink
154            methods
155                void request(MemoryConsumer c, float importance, float quality, Obs o)
156            assoc multi(*) - multi(1) MemoryConsumer
157        
158    
159        class MemoryConsumer "interface"
160            jlink
161            methods
162                int getMaxBytes(float quality)
163                void setReservation(int bytes, float quality, Obs o)
164    
165      ---      ---
166      vertically(60, aaa, MemoryConsumer, TextureImageMemoryConsumer);      vertically(60, aaa, MemoryPartitioner, MemoryConsumer, TextureImageMemoryConsumer);
167    
168      pagequal.w = GLSpans.e;      pagequal.w = GLSpanner.e;
169      horizontally(60, bbb, pagequal, TextureImageMemoryConsumer);      horizontally(60, bbb, pagequal, TextureImageMemoryConsumer);
170    
171        gzz.mem.nw = MemoryPartitioner.nw + (-30, 30);
172        gzz.mem.se = MemoryConsumer.se + (30, -30);
173    
174    
175  Defining the importance function is not simple; this represents the  Defining the importance function is not simple; this represents the
176  tradeoffs between memory use for the focus and context.  The first,  tradeoffs between memory use for the focus and context.  The first,
# Line 165  available. Line 183  available.
183  The cases between the two extremes are the difficult ones.  The cases between the two extremes are the difficult ones.
184    
185    
186    Need to be able to handle case of 1 focus-request + 100 low-quality non-focus requests
187    IN A SINGLE VOBSCENE.
188    
189    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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