@SuppressWarnings("deprecation")
    public void preFill(PreFillType.Builder... bitmapAttributeBuilders) {
        if (current != null) {
            current.cancel();
        }

        PreFillType[] bitmapAttributes = new PreFillType[bitmapAttributeBuilders.length];
        for (int i = 0; i < bitmapAttributeBuilders.length; i++) {
            PreFillType.Builder builder = bitmapAttributeBuilders[i];
            if (builder.getConfig() == null) {
                builder.setConfig(
                        defaultFormat == DecodeFormat.ALWAYS_ARGB_8888 || defaultFormat == DecodeFormat.PREFER_ARGB_8888
                        ? Bitmap.Config.ARGB_8888 : Bitmap.Config.RGB_565);
            }
            bitmapAttributes[i] = builder.build();
        }

        PreFillQueue allocationOrder = generateAllocationOrder(bitmapAttributes);
        current = new BitmapPreFillRunner(bitmapPool, memoryCache, allocationOrder);
        handler.post(current);
    }
A class for pre-filling {@link Bitmap Bitmaps} in a
{@link BitmapPool}.
core/src/main/java/com/bumptech/glide/load/engine/prefill/BitmapPreFiller.java