private void newPixelRun() {
        final Thread current = Thread.currentThread();
        //if(animated) DjVuOptions.err.println("bcr newPixelRun "+this);
        if (source != null) {
            for (int i = 0;;) {
                if (threadArray[NEWPIXEL_THREAD] != current) {
                    break;
                }

                if (flags[NEWPIXELS_FLAG]) {
                    i = 0;
                    flags[NEWPIXELS_FLAG] = false;

//          if(animated) DjVuOptions.err.println("bcr call source.newPixels");
                    source.newPixels();

                    try {
                        Thread.sleep(20L);
                    } catch (final Throwable ignored) {
                    }
                } else {
//          final long lockTime=System.currentTimeMillis();
                    synchronized (mapArray) {
                        if (flags[NEWPIXELS_FLAG]) {
                            continue;
                        }

                        if (i++ > 0) {
                            threadArray[NEWPIXEL_THREAD] = null;

                            break;
                        }

                        try {
                            source.wait(200L);
                        } catch (final Throwable ignored) {
                        }
//            DjVuObject.checkLockTime(lockTime,10000);
                    }
                }
            }
        }
    }