         else return loadMovie(MovieMold(libraryItem).libraryItem);
     }
 
+    protected var _maxDrawn :Map = ValueComputingMap.newMapOf(String, calcMaxDrawn);
     protected const _textures :Dictionary = new Dictionary();// library name to Texture
     protected const _textureOffsets :Dictionary = new Dictionary();// library name to Point
     protected var _lib :XflLibrary;

        return subtexUsage;
    }

    /** Gets the maximum number of pixels drawn in a single frame by the given id. If it's
     * a texture, that's just the number of pixels in the texture. For a movie, it's the frame with
     * the largest set of textures present in its keyframe. For movies inside movies, the frame
     * drawn usage is the maximum that movie can draw. We're trying to get the worst case here.
     */
    public function getMaxDrawn (name :String) :int {
        if (name == null) return 0;
        if (FLIPBOOK_TEXTURE.exec(name) != null || _lib.getLibrary(name) is XflTexture) {
            const tex :Texture = getStarlingTexture(name);

        }
        const xflMovie :MovieMold = _lib.getLibrary(name, MovieMold);
        var maxDrawn :int = 0;
        for (var ii :int = 0; ii < xflMovie.frames; ii++) {
            var drawn :int = 0;
            for each (var layer :LayerMold in xflMovie.layers) {
                var kf :KeyframeMold = layer.keyframeForFrame(ii);
                drawn += kf.visible ? getMaxDrawn(kf.id) : 0;
            }
            maxDrawn = Math.max(maxDrawn, drawn);
        }
