Varags logging

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@892 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Dave Hoover
2010-02-24 01:30:41 +00:00
parent c60e694633
commit f5fc7672f4
@@ -28,8 +28,6 @@ import java.awt.Rectangle;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.samskivert.util.StringUtil;
import static com.threerings.media.Log.log; import static com.threerings.media.Log.log;
/** /**
@@ -68,8 +66,7 @@ public class RegionManager
{ {
// make sure we're on an AWT thread // make sure we're on an AWT thread
if (!EventQueue.isDispatchThread()) { if (!EventQueue.isDispatchThread()) {
log.warning("Oi! Region dirtied on non-AWT thread [rect=" + rect + "].", log.warning("Oi! Region dirtied on non-AWT thread", "rect", rect, new Exception());
new Exception());
} }
// sanity check // sanity check
@@ -81,8 +78,7 @@ public class RegionManager
// more sanity checking // more sanity checking
long x = rect.x, y = rect.y; long x = rect.x, y = rect.y;
if ((Math.abs(x) > Integer.MAX_VALUE/2) || (Math.abs(y) > Integer.MAX_VALUE/2)) { if ((Math.abs(x) > Integer.MAX_VALUE/2) || (Math.abs(y) > Integer.MAX_VALUE/2)) {
log.warning("Requested to dirty questionable region " + log.warning("Requested to dirty questionable region", "rect", rect);
"[rect=" + StringUtil.toString(rect) + "].");
return; // Let's not do it! return; // Let's not do it!
} }
@@ -96,8 +92,8 @@ public class RegionManager
protected final boolean isValidSize (int width, int height) protected final boolean isValidSize (int width, int height)
{ {
if (width < 0 || height < 0) { if (width < 0 || height < 0) {
log.warning("Attempt to add invalid dirty region?! " + log.warning("Attempt to add invalid dirty region?!",
"[size=" + width + "x" + height + "].", new Exception()); "size", (width + "x" + height), new Exception());
return false; return false;
} else if (width == 0 || height == 0) { } else if (width == 0 || height == 0) {
@@ -130,8 +126,8 @@ public class RegionManager
/** /**
* Merges all outstanding dirty regions into a single list of rectangles and returns that to * Merges all outstanding dirty regions into a single list of rectangles and returns that to
* the caller. Interally, the list of accumulated dirty regions is cleared out and prepared for * the caller. Internally, the list of accumulated dirty regions is cleared out and prepared
* the next frame. * for the next frame.
*/ */
public Rectangle[] getDirtyRegions () public Rectangle[] getDirtyRegions ()
{ {