cachedFrame might be null if we’re using a ram buffer