public void pushDrawListHead(PspGeList list){
synchronized (drawListQueue) {
    int arraySize=drawListQueue.size();
    if (arraySize > 0) {
      PspGeList[] array=drawListQueue.toArray(new PspGeList[arraySize]);
      ConcurrentLinkedQueue<PspGeList> newQueue=new ConcurrentLinkedQueue<PspGeList>();
      PspGeList[] newArray=new PspGeList[arraySize + 1];
      newArray[0]=list;
      for (int i=0; i < arraySize; i++) {
        newArray[i + 1]=array[i];
        newQueue.add(newArray[i]);
      }
      drawListQueue=newQueue;
    }
 else {
      drawListQueue.add(list);
    }
  }
}

public void pushDrawListHead ( PspGeList list ) { synchronized ( drawListQueue ) { int arraySize = drawListQueue . size ( ) ; if ( arraySize > 0 ) { PspGeList [ ] array = drawListQueue . toArray ( new PspGeList [ arraySize ] ) ; ConcurrentLinkedQueue < PspGeList > newQueue = new ConcurrentLinkedQueue < PspGeList > ( ) ; PspGeList [ ] newArray = new PspGeList [ arraySize + 1 ] ; newArray [ 0 ] = list ; for ( int i = 0 ; i < arraySize ; i ++ ) { newArray [ i + 1 ] = array [ i ] ; newQueue . add ( newArray [ i ] ) ; } drawListQueue = newQueue ; } else { drawListQueue . add ( list ) ; } } }
called from pspge module
