Commit Graph

36 Commits

Author SHA1 Message Date
Michael Bayne e6a1ebbd80 We need to recreate our back buffer if our frame's bounds change.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2426 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-19 01:04:29 +00:00
Michael Bayne 0bd5d6728c Whoops, left in some debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2326 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-25 23:06:51 +00:00
Michael Bayne 0b0757b98c Fixed up the goddamned repaint fuckola. Fucking pain in the ass, all this
Swing, AWT and frame manager interaction.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2325 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-25 23:05:58 +00:00
Michael Bayne b66e0d2584 Keep track of whether or not anything was painted each frame and avoid the
extra effort of copying the back buffer to the screen if nothing actually
changed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2322 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-25 19:06:54 +00:00
Walter Korman c9dc85cd0d Added a variety of test listeners for the frame so that we can observe
events the frame receives, and a flag to toggle whether to add the
listeners.  Make sure to dispose of the frame graphics context if it
becomes invalid.  Removed code to prevent adding a frame participant more
than once since the observer list now handles that for us.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2148 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-15 02:21:07 +00:00
Michael Bayne 3b09893292 The end of more font hackery.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2046 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-09 05:13:45 +00:00
Michael Bayne 8ab0623a9c Refuse to allow a frame participant to be added more than once; enhanced
FPS display, made it possible for frame participants to add to the
performance status string. Also modified perf status to be double
buffered. It's not repainting exactly properly at the moment; soon to be
remedied.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2041 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-08 02:49:12 +00:00
Michael Bayne acae62db72 Remove the frame rate logging because we have a handy dandy visual display
now.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2026 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 23:21:25 +00:00
Walter Korman 28ee999426 Added facility for displaying the current frame rate information within
the frame buffer, and a debug chord (Alt+Shift+F) to toggle the display.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2025 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 22:07:28 +00:00
Michael Bayne 1d9de38b61 Make the frames per second info available to callers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2018 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 01:25:17 +00:00
Michael Bayne 6cabb846c5 Use a separate runnable for the AWT queue to avoid a call to
EventQueue.isEventDispatchThread() and to make Ray happy.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2017 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-03 19:42:21 +00:00
Michael Bayne b2454c59f3 Removed performance monitor stuff because we can track our frame rate
without expensive calls to System.currentTimeMillis().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2016 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-03 19:29:35 +00:00
Michael Bayne 6eed170158 Fixed problem with ticker wherein it was not properly dropping frames when
it should. Added code to track and report desired and obtained frame rate.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2015 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-03 19:28:04 +00:00
Michael Bayne 699e15e95e Added code to debug tick participants that take excessively long during a
tick() or a paint().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1980 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-22 01:53:39 +00:00
Michael Bayne e006702bf7 Added a frame manager constructor that uses a 100% pure Java timer by
default.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1970 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-20 02:26:33 +00:00
Michael Bayne c4591a92ef System.currentTimeMillis() begone! We use our own pluggable timer system
now (which uses System.currentTimeMillis() at the moment but eventually
won't).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1968 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-20 02:18:49 +00:00
Michael Bayne d4126e3514 Not to log dropped frames.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1955 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-16 00:15:57 +00:00
Michael Bayne d9838206c1 Use Java's timer to invoke our frame tick. Drop frames instead of queueing
up repeats when the previous tick takes too long.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1953 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-15 23:58:34 +00:00
Michael Bayne 2c2a9f819d Documented SafeScrollPane requirement.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1833 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-26 20:31:15 +00:00
Michael Bayne a8bafced3f Target 80 fps; not to tick rather than not to checkpoint wrt the
performance monitor.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1794 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-09 06:31:38 +00:00
Michael Bayne ff8152ea0c Not to reference the instance variable when we were so kindly passed it as
an argument.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1661 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-08-23 20:22:09 +00:00
Michael Bayne 615383483b Revised use of deprecated methods.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1654 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-08-20 19:01:08 +00:00
Michael Bayne 9bffbc0b18 Stuck a final fork (I hope) in the repaint problems associated with popups
and other layered components.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1541 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-25 01:43:29 +00:00
Michael Bayne ad9a54086e Validate invalid components and *then* tick our frame participants for two
reasons: we don't want anything coming in between the call to tick() and
the call to paint() and components will likely want to be validated before
they are ticked if they happen to be a frame participant and are invalid.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1523 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-21 03:43:59 +00:00
Michael Bayne 3976cc2c42 Cache our graphics objects.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1480 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-19 00:52:34 +00:00
Michael Bayne 7253a68c7c Death, taxes and refactoring: seriously revamped the low-level media code
to handle scrolling in a much cleaner and happier way. There's now a
VirtualMediaPanel which operates in virtual coordinates and can be made to
"view" any location in those virtual coordinates. By changing the view,
the view can be scrolled and the view can be made to center on a pathable
(generally a sprite) which will cause it to scroll around as the pathable
moves around in the virtual coordinate space.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1475 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-18 22:25:33 +00:00
Michael Bayne c1ccaac10d Javadoc fixes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1437 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-11 00:52:37 +00:00
Walter Korman cd9131c551 Use an ObserverList to store and work with the frame participants.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1382 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-22 01:48:08 +00:00
Michael Bayne b15d38b54d Relegated a shitload of logging to DEBUG status.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1361 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-15 23:54:35 +00:00
Michael Bayne a98f5f617a Yet more rendering fixes: we render the frame participants before the dirty
Swing components and we go through and specifically render any components
in the upper layers (see JLayeredPane for what this means) that overlap
our frame participants every frame. This is non-optimal, but the hairy
code that somehow magically works out who to repaint when components
overlap is not even something that I want to dig more deeply into. There
are generally not many components in the upper layers (only popups like
menus and tooltips and internal frames when we use them).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1329 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-03 04:16:41 +00:00
Michael Bayne b602cb4fce Modified frame manager to do the right thing in terms of repainting
everything if we lose our volatile offscreen buffer image.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1313 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-28 02:49:32 +00:00
Michael Bayne 46b6defc06 Removed some debug logging; tried the buffer strategy approach which won't
work because we're not painting everything on every frame, but left the
commented out alternative rendering code in there in case we want to
fiddle with it at a later date (or provide support for buffer strategies
for applications that do want to paint everything).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1306 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 22:39:45 +00:00
Michael Bayne 6a7fd11321 Try filling the offscreen buffer with a solid color after we create it to
avoid painting garbage to the screen.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1303 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 18:59:27 +00:00
Michael Bayne 3713cf1034 More repaint manager fixes. We're now behaving even more closely like
Swing would behave.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1296 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 02:33:14 +00:00
Michael Bayne 6549a27189 Need to avoid counting a components offset twice.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1290 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-23 03:10:59 +00:00
Michael Bayne cc6a9d00ef Major low-level rendering rethink. There will be much follow-on cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1286 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-23 01:16:28 +00:00