Added code to warn of requests to dirty rectangles that are unseasonably
large. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1982 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: RegionManager.java,v 1.9 2002/11/07 22:42:51 mdb Exp $
|
||||
// $Id: RegionManager.java,v 1.10 2002/11/22 01:54:59 mdb Exp $
|
||||
|
||||
package com.threerings.media;
|
||||
|
||||
@@ -62,6 +62,17 @@ public class RegionManager
|
||||
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=" + StringUtil.toString(rect) + "].");
|
||||
if (Log.getLevel() == Log.log.DEBUG) {
|
||||
Thread.dumpStack();
|
||||
}
|
||||
}
|
||||
|
||||
if (isValidSize(rect.width, rect.height)) {
|
||||
// Log.info("Invalidating " + StringUtil.toString(rect));
|
||||
_dirty.add(rect);
|
||||
|
||||
Reference in New Issue
Block a user