NetSurf
From NetSurf Development Wiki
Jump to: navigation, search

Todo/AmigaOS frontend

Contents

Plotters

  • Speed up plotting on 16-bit screenmodes

Currently uses a 32-bit off-screen render area (as Cairo requires it), then blits to the 16-bit window bitmap, which seems quite slow. Maybe we can force using graphics.library on 16-bit screenmodes (with friend bitmap as offscreen render area)? No, that doesn't work as the alpha channel is then lost on images. Going back to direct-to-screen (with all the headaches that entails) might end up being the only solution here (see below).

  • Enable plotting on 8-bit screenmodes

Currently we block the user from selecting an 8-bit screenmode for NetSurf's own screen, but the user can open on another 8-bit public screen. As above, plotting occurs to an off-screen 32-bit bitmap and is blitted to the (8-bit in this case) window.

Option 1 to try: Might be as easy as specifying BLITA_CLUT with the current screen's palette. However, even blitting down to 16-bit is slow so might not be good from a performance POV. This doesn't work - BLITA_CLUT appears to have no effect for a destination 8-bit bitmap attached to a window rastport.

Option 2: Use FindColor() and force graphics.library plotting. May be an issue with bitmaps, should be able to resample using datatypes.library but this is all extra processing. If we're on an 8-bit screenmode we probably aren't going to be running on anything particulary fast! Might be able to cheat by only using the new DataTypes image content handler, which will dither images down for us if not PMODE_V43. We can keep them in native format and just blit to the screen.

  • Direct rendering - problems
    • inline image placement
    • grey background for all text
    • won't work with Cairo renderer
    • may crash with certain gfx lib operations (AreaFill - need to alloc AreaInfo/TmpRas, check if this is ok to do on window rastports or if one or the other is allocated already)
    • completely broken with tiled renderer
  • ami_init_layers/ami_free_layers
    • Needs to only allocate relevant things for the current option_cairo_renderer and option_direct_render settings
    • Any option to dynamically change these in the GUI will need to ami_free_layers under the old settings, change them and then ami_init_layers - for all gui_globals in use (treeview, local history, print, browserglob - individual window rastports)
  • Text
    • Replace ligatures?
    • Scan fonts to find Unicode chars (for each of serif, sans, etc), rather than being limited to one fallback font
  • Simple Refresh
    • Dragging windows off- and back on-screen does not redraw correctly
    • Dragging blocking windows (eg. About) over the top of a render area does not redraw at all
    • Favicon and throbbers do not redraw when damaged (the redraw functions just crash when they are initiated from the hook/ami_handle_msg)
  • Investigate why scrolling up is slower than scrolling down

User Interface

  • Shiny new treeview toolbar
  • Drag-related
    • Support the drag'n'drop of icons from/to OpenAmiga Filer project
    • Drag to hotlist from WB?
    • Drag selections within text input fields should do a move rather than a copy (might be core bug?)
    • Clicks to become drags only after 5px or so movement (done for treeviews)
  • Iconify gadget - for non-WB screens. Add extra AppIcons functions, eg Info, Delete. Dynamic updates?
  • Redirect requesters to correct screen
  • Save as IFF needs to give a more sensible filename
  • Show window close confirmation if >1 tab open
  • Allow multiple homepages
  • Add play/stop buttons in sound DT handler
  • Find window improvements (enter to search, don't wait to unghost next/prev etc)
  • Fix Hotlist menu auto-refresh (still crashing after a few iterations)
  • Toolbar BitMapObjects aren't all getting freed (check this; might be bitmap.image caching; there is a note in the source that nav_west etc might need freeing)

Misc

  • Investigate deferred redraw
  • Replace ExAll() usage in menu.c with whatever the new OS4 equivalent is

OS3 Support

Please see http://www.amiga.org/forums/showthread.php?t=56813 and http://amigaworld.net/modules/newbb/viewtopic.php?topic_id=34237&forum=27 for various discussion around this topic.

This is roughly what needs to be modified to get the OS4 frontend to work on OS3.9:

  • font.c

Font code uses the new-style diskfont.library bullet interface. It either needs to be tweaked to be the old one and the BltBitMapTags call avoided (the latter might be more difficult than the former), or changed entirely to use ttfengine.library or freetype2. I have some old code for ttfengine lying around which needs fixing up but did generally work at some point in the past.

utri007 on amiga.org notes that avoiding outline fonts will speed up NetSurf on old hardware. Chris' comments: Doable, but won't look pretty due to ambiguous sizing of text on web pages - you're looking at scaled bitmap fonts for the most part (or a lot of different sized bitmaps converted from a TrueType/CG font). You'll also lose UTF-8 character support (text needs to be converted to local charset and printed with Text())

If you delve way back into SVN there is a font.c set up exactly like this. It's probably best as a user option (fast+ugly, slow+pretty)

  • plotters

P96 needs to be ripped out/avoided if either (a) P96 is not available or (b) a <= 8-bit screenmode is in use. This is further-reaching than the plotters code - the aforementioned font code expects 32-bit and the bitmaps are all in 32-bit too, so dithering and pen allocation needs to be done. (note this is something which needs to be done for OS4 too; currently NetSurf OS4 won't display properly on 8-bit screenmodes) (see also plotters section above)

  • gui

The already-mentioned tweaks to remove new Reaction features (WINDOW_NewMenu needs replacing with CreateMenus/LayoutMenus etc; the vertical scrollbar is attached using a new feature; the horizontal one uses new scrollergclass).

  • arexx

Functions need #ifdef'ing with ASM headers.

  • misc

Littered throughout the code are new calls for allocating memory, resources, interfaces, etc - this all needs backporting. application.library stuff should automagically disable (will still need #ifdefing though), no_drag_icons will need to default to 1 for OS3 (I think it does anyway).

Personal tools