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 |
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, |
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 |
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 |
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 |
|
|
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, |
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 |
|
|