commit (HEAD): remove block width cache

From: Tomas Frydrych (tomasfrydrych_at_yahoo.co.uk)
Date: Fri Mar 12 2004 - 07:39:30 EST

  • Next message: msevior_at_physics.unimelb.edu.au: "Re: commit (HEAD): remove block width cache"

    I have removed the block width chache as this turned out to be a
    fairly straight forward change; instead each text run has its own
    cache inside its GR_RenderInfo structure (in fact, if the graphics
    class does not want to cache width, it might not do so).

    Layout class that needs to ascertain width of a certain character has
    to do so using GR_Graphics::getTextWidth():

        ri.m_iOffset = char_offset;
        ri.m_iLength = 1;
        iWidth = getGraphics()->getTextWidth(ri);

    With this change, the layout classes are almost completely ignorant
    of details of text shaping, measuring and caching; there is one or
    two other changes needed inside fp_TextRun to make them completely
    oblivious, which I will hopfully do over the weekend.

    I have also changed the char advance cache used by the XP
    implementation to a static one; this should significantly decrease
    our memory footprint (it should have been static to start with,
    oversight on my part).
    Tomas



    This archive was generated by hypermail 2.1.4 : Fri Mar 12 2004 - 07:41:20 EST