Commit Graph

174 Commits

Author SHA1 Message Date
Chris Young
31c08f39be Basic event loop, only handles keypresses and window closure so far 2017-01-01 14:53:37 +00:00
Chris Young
c40e8197c2 Allow for the prospect of in-window scrollbars 2017-01-01 14:34:04 +00:00
Chris Young
8196f5b602 Basic template for an Amiga core window
Drawing and event processing not written yet
2017-01-01 13:28:11 +00:00
Chris Young
86a0f14d0a Make the documentation reflect reality.
ExtMem is enabled by default for now to give it a good workout.  Disabled may be a more sensible default.
2016-12-31 14:47:33 +00:00
Chris Young
8af9a8407b Don't unmap ExtMem immediately as:
(a) it is upsetting the gif decoder (although I suspect it is caused by the OS struggling with the excessive remaps)
(b) We are probably going to need to map it back in imminently for display
2016-12-31 14:43:06 +00:00
Chris Young
36b26b861f Update to test ExtMem on OS4.1FEU1
Mostly works, but falls over when there are lots of tiny GIF anims on screen
2016-12-31 14:17:22 +00:00
Chris Young
43bbdc520d Fix merge error 2016-12-31 14:04:14 +00:00
Chris Young
b7551fec72 NULL iextmem 2016-12-31 14:03:34 +00:00
Chris Young
570212add2 Don't map an extmem area is it is already mapped, just extend the lifetime 2016-12-31 14:03:34 +00:00
Chris Young
adac4d98bb More logging 2016-12-31 14:03:34 +00:00
Chris Young
982a59744f Revert "Disable ExtMem in palette-mapped modes"
This reverts commit 4db40c3f27d0ade8fc76f57cd383e5ff52ad7c93.
2016-12-31 14:03:33 +00:00
Chris Young
205abcf189 Debug logging 2016-12-31 14:03:33 +00:00
Chris Young
937dce4f2e Schedule unmapping the extmem object to ensure it releases main memory 2016-12-31 14:03:33 +00:00
Chris Young
493036a920 Documentation 2016-12-31 14:02:40 +00:00
Chris Young
a83afda791 Disable ExtMem in palette-mapped modes
Something handling palette mapped images causes a freeze.
2016-12-31 14:01:29 +00:00
Chris Young
0804c43bf1 Allocate uncompressed bitmap data in extended memory.
This currently isn't working correctly - it simply freezes at some point after loading the page.
2016-12-31 14:01:29 +00:00
Vincent Sanders
48f868a955 move tree compatability layer to amiga frontend 2016-12-31 01:04:27 +00:00
Chris Young
76673bbf65 add a todo 2016-12-31 00:58:03 +00:00
Chris Young
5e523b608a Simply the event loop for the shared message port
This now simply calls the event callback for each window, which returns TRUE is the window was closed during event processing.
The window loop now restarts if any windows were closed, which fixes a potential rare issue with delayed event processing.
2016-12-31 00:51:05 +00:00
Chris Young
9df30eb78f Update local history window to use event callback 2016-12-31 00:43:06 +00:00
Chris Young
d8eec1b048 Update print window to use event callback 2016-12-31 00:37:59 +00:00
Chris Young
d9c8d1c70c Update 401 login window to use event callbacks 2016-12-31 00:30:42 +00:00
Chris Young
d90e82d3f1 Simplify closing of windows on quit
If they have a close callback it will be called.
Some windows are attached to browser windows and closed elsewhere without using the callbacks.
2016-12-31 00:14:44 +00:00
Chris Young
4893a9f9af Update download window to use event callbacks 2016-12-31 00:11:06 +00:00
Chris Young
6ba5edaede Update GUI options window to use event callback 2016-12-31 00:02:21 +00:00
Chris Young
47379c0444 Update treeviews to use event callback 2016-12-30 13:06:42 +00:00
Chris Young
9379a64c6d Start tidying up Amiga event-handling code
As we used a shared message port, we call different event-handling functions for different window types.
This changes that so we register the event-handler as a callback so we can handle event processing for all windows generically.
Currently the main browser window and find window use the new approach, so the handling still has a long list of window types.
This should also make window_list private to gui.c
2016-12-30 00:59:12 +00:00
Chris Young
9d77dc83bd Never warn the user about multiple tabs being open when we're in the process of quitting. 2016-12-15 18:23:52 +00:00
Chris Young
f04103398b Avoid leaking memory when typing 2016-12-11 23:04:13 +00:00
Chris Young
ba0895121b Ensure we close all opened resources when we early exit 2016-12-11 16:16:11 +00:00
Chris Young
9d694f56bb Tidy-up init a bit 2016-12-11 16:04:16 +00:00
Chris Young
433418a8e9 Finalise bitmap code last as purging the cache needs it 2016-12-11 15:24:56 +00:00
Chris Young
34a587849c Move as much closedown as possible into gui_quit 2016-12-11 15:18:08 +00:00
Chris Young
68e8152f3e Ensure OpenURL list is always freed 2016-12-07 00:00:54 +00:00
Chris Young
8f9a652774 Revert "Ensure we free the pen list memory"
This reverts commit 74d7c2d2c2.
2016-12-06 23:58:47 +00:00
Chris Young
ecf2fdf612 Free the correct memory pointer 2016-12-06 23:39:46 +00:00
Chris Young
74d7c2d2c2 Ensure we free the pen list memory 2016-12-06 23:39:04 +00:00
Chris Young
a440907b78 Fix memory leak 2016-12-06 23:34:24 +00:00
Chris Young
c0a15de1e4 Ensure pool init returns non-NULL so it isn't treated as an error. 2016-12-06 23:23:01 +00:00
Chris Young
2b6a416970 Replace custom itempool functions with malloc/free as clib handles these more efficiently than our pools. 2016-12-06 23:17:40 +00:00
Chris Young
f38b72a583 Avoid potential memory leak 2016-12-06 17:54:58 +00:00
Chris Young
2dd97b0b8e Fix brokenness caused by recent changes 2016-12-05 23:32:55 +00:00
Chris Young
4b91c43003 Add missing nsoption_finalise 2016-12-05 23:08:17 +00:00
Chris Young
2fe884be65 Fix memory leak searching for resources 2016-12-05 20:30:48 +00:00
Chris Young
71afaacc80 Fix last tab title not being freed 2016-12-05 20:22:21 +00:00
Chris Young
2a9e89de75 Fix potential memory leak 2016-12-05 19:31:04 +00:00
Chris Young
54e31b65d1 Guard against crashing when opening the splash screen
Add extra logging for when things go wrong at this stage
2016-11-28 19:35:15 +00:00
Chris Young
0bc32aa654 Add more clib2 stats
JSON formatted data can now be saved with ARexx "SLABSTATS stats.json"
2016-11-27 17:10:03 +00:00
Chris Young
4fb38f574a AmigaOS low memory handler attempt 2
Neither freeing slabs nor purging the cache are safe to call from interrupts, so instead we schedule these to run on NetSurf's process.
If NetSurf is busy, there may be significant delay, so the priority is set low to ensure this is called only when other - faster - memory handlers have been exhausted.
I don't know if this works, or is sane, as I'm not entirely sure how to test it.
Something similar needs adding for OS4 but low memory is less of an issue there, so will see if this works on OS3 first.
2016-11-27 16:25:27 +00:00
Chris Young
a76a36915c Ensure the memory for the mem-handler interrupt is allocated 2016-11-27 15:36:30 +00:00