Bug 832554: Add #ifdef guards around static functions in /gfx/thebes that aren't used on android, to fix android-only -Wunused-function build warnings. r=BenWa a=nonlibxul

This commit is contained in:
Daniel Holbert 2013-01-21 13:54:42 -08:00
parent 071b09c1cc
commit 74901ab44c
3 changed files with 13 additions and 9 deletions

View File

@ -39,15 +39,6 @@
#include "mozilla/Preferences.h"
static PRLogModuleInfo *
GetFontLog()
{
static PRLogModuleInfo *sLog;
if (!sLog)
sLog = PR_NewLogModule("ft2fonts");
return sLog;
}
// rounding and truncation functions for a Freetype floating point number
// (FT26Dot6) stored in a 32bit integer with high 26 bits for the integer
// part and low 6 bits for the fractional part.
@ -61,6 +52,15 @@ GetFontLog()
* gfxFT2FontGroup
*/
static PRLogModuleInfo *
GetFontLog()
{
static PRLogModuleInfo *sLog;
if (!sLog)
sLog = PR_NewLogModule("ft2fonts");
return sLog;
}
bool
gfxFT2FontGroup::FontCallback(const nsAString& fontName,
const nsACString& genericName,

View File

@ -144,6 +144,7 @@ static const gfxFloat BOX_BORDER_OPACITY = 0.5;
* Quartz cairo backend which doesn't generally support masking with surfaces.
* So for now we just paint a bunch of rectangles...
*/
#ifndef MOZ_GFX_OPTIMIZE_MOBILE
static void
DrawHexChar(gfxContext *aContext, const gfxPoint& aPt, uint32_t aDigit)
{
@ -160,6 +161,7 @@ DrawHexChar(gfxContext *aContext, const gfxPoint& aPt, uint32_t aDigit)
}
aContext->Fill();
}
#endif // MOZ_GFX_OPTIMIZE_MOBILE
void
gfxFontMissingGlyphs::DrawMissingGlyph(gfxContext *aContext, const gfxRect& aRect,

View File

@ -210,6 +210,7 @@ OptimalFillOperator()
#endif
}
#ifndef MOZ_GFX_OPTIMIZE_MOBILE
// EXTEND_PAD won't help us here; we have to create a temporary surface to hold
// the subimage of pixels we're allowed to sample.
static already_AddRefed<gfxDrawable>
@ -259,6 +260,7 @@ CreateSamplingRestrictedDrawable(gfxDrawable* aDrawable,
new gfxSurfaceDrawable(temp, size, gfxMatrix().Translate(-needed.TopLeft()));
return drawable.forget();
}
#endif // !MOZ_GFX_OPTIMIZE_MOBILE
// working around cairo/pixman bug (bug 364968)
// Our device-space-to-image-space transform may not be acceptable to pixman.