Esempio n. 1
0
 /**
  * Enables user to provide a custom configuration that can be used with this DrawStream.
  *
  * @param key Unique object used to identify the configuration.
  * @param prog Program to use in configuration.
  * @param vertWriter BoWriter to serialize data in configuration.
  */
 public void createCustomConfig(Object key, Program prog, BoWriter<? super DrawVert> vertWriter) {
   Writer writer = new Writer(prog, vertWriter);
   Writer prev = mWriters.put(key, writer);
   if (prev != null) {
     prev.deref();
   }
 }
Esempio n. 2
0
 /**
  * Disposes previously created configuration.
  *
  * @param key Unique object used to identify the configuration.
  */
 public boolean disposeCustomConfig(Object key) {
   Writer prev = mWriters.remove(key);
   if (prev != null) {
     prev.deref();
     return true;
   }
   return false;
 }