code: public void addDirtyRegion (Rectangle rect)
      {
          // make sure we're on an AWT thread
          if (!EventQueue.isDispatchThread()) {
              log.warning("Oi! Region dirtied on non-AWT thread", "rect", rect, new Exception());
          }
  
          // sanity check
          if (rect == null) {
              log.warning("Attempt to dirty a null rect!?", new Exception());
              return;
          }
  
          // more sanity checking
          long x = rect.x, y = rect.y;
          if ((Math.abs(x) > Integer.MAX_VALUE/2) || (Math.abs(y) > Integer.MAX_VALUE/2)) {
              log.warning("Requested to dirty questionable region", "rect", rect, new Exception());
              return; // Let's not do it!
          }
  
          if (isValidSize(rect.width, rect.height)) {
              // Log.info("Invalidating " + StringUtil.toString(rect));
              _dirty.add(rect);
          }
      }
docs: Adds the supplied rectangle to the dirty regions. Control of the rectangle is given to the
  region manager as it may choose to bend, fold or mutilate it later. If you don't want the
  region manager messing with your rectangle, use {@link #invalidateRegion}.