Don't request to dirty an invalid region if we scroll more than an entire
screen vertically, instead request to dirty one with zero height. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1862 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: VirtualMediaPanel.java,v 1.10 2002/09/16 23:34:55 mdb Exp $
|
// $Id: VirtualMediaPanel.java,v 1.11 2002/10/30 00:27:37 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.media;
|
package com.threerings.media;
|
||||||
|
|
||||||
@@ -182,13 +182,18 @@ public class VirtualMediaPanel extends MediaPanel
|
|||||||
// determine how far we'll be moving on this tick
|
// determine how far we'll be moving on this tick
|
||||||
_dx = _nx - _tx; _dy = _ny - _ty;
|
_dx = _nx - _tx; _dy = _ny - _ty;
|
||||||
|
|
||||||
|
Log.info("Scrolling into place [n=(" + _nx + ", " + _ny +
|
||||||
|
"), t=(" + _tx + ", " + _ty +
|
||||||
|
"), d=(" + _dx + ", " + _dy +
|
||||||
|
"), width=" + width + ", height=" + height + "].");
|
||||||
|
|
||||||
// these are used to prevent the vertical strip from
|
// these are used to prevent the vertical strip from
|
||||||
// overlapping the horizontal strip
|
// overlapping the horizontal strip
|
||||||
int sy = _ny, shei = height;
|
int sy = _ny, shei = height;
|
||||||
|
|
||||||
// and add invalid rectangles for the exposed areas
|
// and add invalid rectangles for the exposed areas
|
||||||
if (_dy > 0) {
|
if (_dy > 0) {
|
||||||
shei -= _dy;
|
shei = Math.max(shei - _dy, 0);
|
||||||
_remgr.invalidateRegion(_nx, _ny + height - _dy, width, _dy);
|
_remgr.invalidateRegion(_nx, _ny + height - _dy, width, _dy);
|
||||||
} else if (_dy < 0) {
|
} else if (_dy < 0) {
|
||||||
sy -= _dy;
|
sy -= _dy;
|
||||||
@@ -204,10 +209,6 @@ public class VirtualMediaPanel extends MediaPanel
|
|||||||
// between here and the call to paint() for this tick don't
|
// between here and the call to paint() for this tick don't
|
||||||
// booch everything
|
// booch everything
|
||||||
_tx = _nx; _ty = _ny;
|
_tx = _nx; _ty = _ny;
|
||||||
|
|
||||||
// Log.info("Scrolling into place " +
|
|
||||||
// "[dx=" + _dx + ", dy=" + _dy +
|
|
||||||
// ", tx=" + _tx + ", ty=" + _ty + "].");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user