code: public void addDirtyRegion (Rectangle rect)
      {
          // Only add dirty regions where rect intersects our actual media as the set region will
          // propagate out to the repaint manager.
          for (AbstractMedia media : _metamgr) {
              Rectangle intersection = media.getBounds().intersection(rect);
              if (!intersection.isEmpty()) {
                  _metamgr.getRegionManager().addDirtyRegion(intersection);
              }
          }
      }
docs: Adds a dirty region to this overlay.