Exemplo n.º 1
0
 private synchronized void removeDecoder(ImageDecoder mydecoder) {
   doneDecoding(mydecoder);
   ImageDecoder idprev = null;
   for (ImageDecoder id = decoders; id != null; id = id.next) {
     if (id == mydecoder) {
       if (idprev == null) {
         decoders = id.next;
       } else {
         idprev.next = id.next;
       }
       break;
     }
     idprev = id;
   }
 }
Exemplo n.º 2
0
 private void setDecoder(ImageDecoder mydecoder) {
   ImageConsumerQueue cq;
   synchronized (this) {
     mydecoder.next = decoders;
     decoders = mydecoder;
     decoder = mydecoder;
     cq = consumers;
     mydecoder.queue = cq;
     consumers = null;
     awaitingFetch = false;
   }
   while (cq != null) {
     if (cq.interested) {
       // Now that there is a decoder, security may have changed
       // so reverify it here, just in case.
       if (!checkSecurity(cq.securityContext, true)) {
         errorConsumer(cq, false);
       }
     }
     cq = cq.next;
   }
 }