Code example for ArrayDeque

Methods: clear

0
			mIsQueued = true;
			mGlRoot.addOnGLIdleListener(this);
		} 
 
		public synchronized void clear() { 
			mTextures.clear();
		} 
 
		@Override 
		public boolean onGLIdle(final GLCanvas canvas, final boolean renderRequested) {
			final ArrayDeque<TiledTexture> deque = mTextures;
			synchronized (this) {
				long now = SystemClock.uptimeMillis();
				final long dueTime = now + UPLOAD_TILE_LIMIT;
				while (now < dueTime && !deque.isEmpty()) {
					final TiledTexture t = deque.peekFirst();
					if (t.uploadNextTile(canvas)) {
						deque.removeFirst();
						mGlRoot.requestRender();
					} 
					now = SystemClock.uptimeMillis();