Previously dirty rects were set up in a subtle way where early in the pipeline None is used to mean "no information" and therefore "all clean", but then later on is used to mean "all dirty" on the assumption that if a texture is still being handled, some dirty information must have been sent. None is therefore used by the internals as a way to signal things like missing cache entries without actually bothering to look up the dimensions of the image (note that "clean" can always be expressed without knowing dimensions, as it is always the same empty rect). I change the system to just consistently use a custom enum that has AllDirty and SomeDirty(empty_rect) to represent these two states. As a result the code seems much easier to understand.