b=499853; swimplify missing glyph rendering on mobile; r=stuart
authorVladimir Vukicevic <vladimir@pobox.com>
Wed, 01 Jul 2009 11:36:57 -0700
changeset 29940 082875fdb725a0182e05320b67b5f41bedd2bd9f
parent 29939 8a7eb0b510aa0a0a59897532a861069c3486be75
child 29941 b15a28eeed13491c92233f793baeb90fdc894011
push idunknown
push userunknown
push dateunknown
reviewersstuart
bugs499853
milestone1.9.2a1pre
b=499853; swimplify missing glyph rendering on mobile; r=stuart
gfx/thebes/src/gfxFontMissingGlyphs.cpp
--- a/gfx/thebes/src/gfxFontMissingGlyphs.cpp
+++ b/gfx/thebes/src/gfxFontMissingGlyphs.cpp
@@ -219,19 +219,25 @@ gfxFontMissingGlyphs::DrawMissingGlyph(g
         aContext->SetDash(gfxContext::gfxLineSolid);
         aContext->SetLineCap(gfxContext::LINE_CAP_SQUARE);
         aContext->SetLineJoin(gfxContext::LINE_JOIN_MITER);
         gfxRGBA color = currentColor;
         color.a *= BOX_BORDER_OPACITY;
         aContext->SetDeviceColor(color);
         aContext->NewPath();
         aContext->Rectangle(borderStrokeRect);
+
+#ifdef MOZ_GFX_OPTIMIZE_MOBILE
+        aContext->Fill();
+#else
         aContext->Stroke();
+#endif
     }
 
+#ifndef MOZ_GFX_OPTIMIZE_MOBILE
     gfxPoint center(aRect.X() + aRect.Width()/2,
                     aRect.Y() + aRect.Height()/2);
     gfxFloat halfGap = HEX_CHAR_GAP/2.0;
     gfxFloat top = -(MINIFONT_HEIGHT + halfGap);
     if (aChar < 0x10000) {
         if (aRect.Width() >= 2*MINIFONT_WIDTH + HEX_CHAR_GAP &&
             aRect.Height() >= 2*MINIFONT_HEIGHT + HEX_CHAR_GAP) {
             // Draw 4 digits for BMP
@@ -263,16 +269,17 @@ gfxFontMissingGlyphs::DrawMissingGlyph(g
             DrawHexChar(aContext,
                         center + gfxPoint(first, halfGap), (aChar >> 8) & 0xF);
             DrawHexChar(aContext,
                         center + gfxPoint(second, halfGap), (aChar >> 4) & 0xF);
             DrawHexChar(aContext,
                         center + gfxPoint(third, halfGap), aChar & 0xF);
         }
     }
+#endif
 
     aContext->Restore();
 }
 
 gfxFloat
 gfxFontMissingGlyphs::GetDesiredMinWidth(PRUint32 aChar)
 {
 /**