/[gzz]/gzz/gzz/gfx/gl/GLSpanner.java
ViewVC logotype

Diff of /gzz/gzz/gfx/gl/GLSpanner.java

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

revision 1.15 by tjl, Fri Feb 21 20:02:38 2003 UTC revision 1.16 by tjl, Mon Mar 3 12:25:48 2003 UTC
# Line 46  public class GLSpanner { Line 46  public class GLSpanner {
46      public static boolean dbg = false;      public static boolean dbg = false;
47      private static void pa(String s) { System.out.println(s); }      private static void pa(String s) { System.out.println(s); }
48    
49                static MipzipMemoryConsumer currentlyLoaded = null;
50    
51      static MemoryPartitioner pool;      static MemoryPartitioner pool;
52      static {      static {
53          String mem_str = System.getProperty("GFX_MEM", "16");          String mem_str = System.getProperty("GFX_MEM", "16");
# Line 56  public class GLSpanner { Line 57  public class GLSpanner {
57          pool = new MemoryPartitioner(mem * 1024 * 1024);          pool = new MemoryPartitioner(mem * 1024 * 1024);
58      }      }
59    
60        /** Irrevocably stop using the memorypartitioner interface
61         * for allocating textures.
62         */
63        public static void dangerouslyOverrideMemoryPartitioner() {
64            pool.stop();
65            pool = null;
66        }
67    
68      private static class SpanSB {      private static class SpanSB {
69          PageImageScroll sb;          PageImageScroll sb;
70          SpanPage[] pages;          SpanPage[] pages;
# Line 102  public class GLSpanner { Line 111  public class GLSpanner {
111           *              of the drawn area.           *              of the drawn area.
112           */           */
113          public GL.Texture getTexture(float importance, float pixels) {          public GL.Texture getTexture(float importance, float pixels) {
114                if(pool == null) {
115                    if(currentlyLoaded != consumer) {
116                        currentlyLoaded.loadToBaseLevelSynch(1000);
117                        currentlyLoaded = consumer;
118                        currentlyLoaded.loadToBaseLevelSynch(0);
119                    }
120                }
121              return consumer.getTexture(importance, pixels);              return consumer.getTexture(importance, pixels);
122          }          }
123    
# Line 212  public class GLSpanner { Line 228  public class GLSpanner {
228          return r;          return r;
229      }      }
230    
231        public static void clearCache() {
232            span2rect = new WeakHashMap();
233            sb2spansb = new WeakHashMap();
234        }
235    
236    
237  }  }

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

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