protected final boolean isValidSize ( int width , int height ) { if ( width < 0 || height < 0 ) { log . warning ( "Attempt to add invalid dirty region?!" , "size" , ( width + "x" + height ) , new Exception ( ) ) ; return false ; } else if ( width == 0 || height == 0 ) { // no need to complain about zero sized rectangles, just ignore them return false ; } else { return true ; } }
Used to ensure our dirty regions are not invalid .