SkiaPooledImageRegionDecoder.java 文件源码

java
阅读 23 收藏 0 点赞 0 评论 0

项目:garras 作者:
/**
 * While there are decoders in the map, wait until each is available before acquiring,
 * recycling and removing it. After this is called, any call to {@link #acquire()} will
 * block forever, so this call should happen within a write lock, and all calls to
 * {@link #acquire()} should be made within a read lock so they cannot end up blocking on
 * the semaphore when it has no permits.
 */
private synchronized void recycle() {
    while (!decoders.isEmpty()) {
        BitmapRegionDecoder decoder = acquire();
        decoder.recycle();
        decoders.remove(decoder);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号