[webkit-reviews] review granted: [Bug 25605] Reduce the size of GlyphPage : [Attachment 30086] Patch, changelog

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 7 13:54:25 PDT 2009


Darin Adler <darin at apple.com> has granted Simon Fraser (smfr)
<simon.fraser at apple.com>'s request for review:
Bug 25605: Reduce the size of GlyphPage
https://bugs.webkit.org/show_bug.cgi?id=25605

Attachment 30086: Patch, changelog
https://bugs.webkit.org/attachment.cgi?id=30086&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
> +    GlyphData()
> +	   : glyph(0)
> +	   , fontData(0)
> +    {
> +    }
> +    GlyphData(Glyph g, const SimpleFontData* f)
> +	   : glyph(g)
> +	   , fontData(f)
> +    {
> +    }

Could just write the above as one constructor with default arguments:

    GlyphData(Glyph g = 0, const SimpleFontData* f = 0)

instead.

> +	   memcpy(m_glyphs, other.m_glyphs, GlyphPage::size *
sizeof(m_glyphs[0]));
> +	   memcpy(m_glyphFontData, other.m_glyphFontData, GlyphPage::size *
sizeof(m_glyphFontData[0]));

This is in a member of GlyphPage, so you can omit the GlyphPage:: from the use
of size. In fact, you should just use sizeof(m_glyphs) and
sizeof(m_glyphFontData).

> +	   memset(m_glyphs, 0, GlyphPage::size * sizeof(m_glyphs[0]));
> +	   memset(m_glyphFontData, 0, GlyphPage::size *
sizeof(m_glyphFontData[0]));

Ditto.

r=me


More information about the webkit-reviews mailing list