зеркало из https://github.com/mozilla/gecko-dev.git
Bug 939585 - Build gfx/thebes in unified mode. r=ehsan,bjacob
This commit is contained in:
Родитель
a735170d84
Коммит
49ae528201
|
@ -489,6 +489,8 @@ gfxCoreTextShaper::SetGlyphsFromRun(gfxShapedText *aShapedText,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#undef SMALL_GLYPH_RUN
|
||||
|
||||
// Construct the font attribute descriptor that we'll apply by default when creating a CTFontRef.
|
||||
// This will turn off line-edge swashes by default, because we don't know the actual line breaks
|
||||
// when doing glyph shaping.
|
||||
|
|
|
@ -2254,7 +2254,7 @@ struct GlyphBufferAzure {
|
|||
std::reverse(begin, end);
|
||||
}
|
||||
|
||||
gfx::GlyphBuffer buf;
|
||||
mozilla::gfx::GlyphBuffer buf;
|
||||
buf.mGlyphs = mGlyphBuffer;
|
||||
buf.mNumGlyphs = mNumGlyphs;
|
||||
|
||||
|
@ -2336,7 +2336,7 @@ struct GlyphBufferAzure {
|
|||
private:
|
||||
void FlushStroke(DrawTarget *aDT, gfxTextContextPaint *aContextPaint,
|
||||
ScaledFont *aFont, gfxContext *aThebesContext,
|
||||
gfx::GlyphBuffer& aBuf, gfxContext::AzureState& aState)
|
||||
mozilla::gfx::GlyphBuffer& aBuf, gfxContext::AzureState& aState)
|
||||
{
|
||||
RefPtr<Path> path = aFont->GetPathForGlyphs(aBuf, aDT);
|
||||
if (aContextPaint) {
|
||||
|
|
|
@ -336,6 +336,8 @@ gfxGraphiteShaper::SetGlyphsFromSegment(gfxContext *aContext,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#undef SMALL_GLYPH_RUN
|
||||
|
||||
// for language tag validation - include list of tags from the IANA registry
|
||||
#include "gfxLanguageTagList.cpp"
|
||||
|
||||
|
|
|
@ -779,7 +779,7 @@ HBUnicodeDecompose(hb_unicode_funcs_t *ufuncs,
|
|||
}
|
||||
|
||||
static PLDHashOperator
|
||||
AddFeature(const uint32_t& aTag, uint32_t& aValue, void *aUserArg)
|
||||
AddHartBuzzFeature(const uint32_t& aTag, uint32_t& aValue, void *aUserArg)
|
||||
{
|
||||
nsTArray<hb_feature_t>* features = static_cast<nsTArray<hb_feature_t>*> (aUserArg);
|
||||
|
||||
|
@ -932,7 +932,7 @@ gfxHarfBuzzShaper::ShapeText(gfxContext *aContext,
|
|||
mergedFeatures))
|
||||
{
|
||||
// enumerate result and insert into hb_feature array
|
||||
mergedFeatures.Enumerate(AddFeature, &features);
|
||||
mergedFeatures.Enumerate(AddHartBuzzFeature, &features);
|
||||
}
|
||||
|
||||
bool isRightToLeft = aShapedText->IsRightToLeft();
|
||||
|
@ -1240,3 +1240,6 @@ gfxHarfBuzzShaper::SetGlyphsFromRun(gfxContext *aContext,
|
|||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#undef SMALL_GLYPH_RUN
|
||||
|
||||
|
|
|
@ -393,14 +393,12 @@ gfxPlatformFontList::SystemFindFontForChar(const uint32_t aCh,
|
|||
TimeStamp start = TimeStamp::Now();
|
||||
|
||||
// search commonly available fonts
|
||||
bool common = true;
|
||||
gfxFontFamily *fallbackFamily = nullptr;
|
||||
fontEntry = CommonFontFallback(aCh, aRunScript, aStyle, &fallbackFamily);
|
||||
|
||||
// if didn't find a font, do system-wide fallback (except for specials)
|
||||
uint32_t cmapCount = 0;
|
||||
if (!fontEntry) {
|
||||
common = false;
|
||||
fontEntry = GlobalFontFallback(aCh, aRunScript, aStyle, cmapCount,
|
||||
&fallbackFamily);
|
||||
}
|
||||
|
@ -416,7 +414,7 @@ gfxPlatformFontList::SystemFindFontForChar(const uint32_t aCh,
|
|||
("(textrun-systemfallback-%s) char: u+%6.6x "
|
||||
"unicode-range: %d script: %d match: [%s]"
|
||||
" time: %dus cmaps: %d\n",
|
||||
(common ? "common" : "global"), aCh,
|
||||
(fontEntry ? "common" : "global"), aCh,
|
||||
unicodeRange, script,
|
||||
(fontEntry ? NS_ConvertUTF16toUTF8(fontEntry->Name()).get() :
|
||||
"<none>"),
|
||||
|
|
|
@ -35,8 +35,8 @@ gfxUserFontSet::GetUserFontsLog()
|
|||
}
|
||||
#endif /* PR_LOGGING */
|
||||
|
||||
#define LOG(args) PR_LOG(GetUserFontsLog(), PR_LOG_DEBUG, args)
|
||||
#define LOG_ENABLED() PR_LOG_TEST(GetUserFontsLog(), PR_LOG_DEBUG)
|
||||
#define FONTSET_LOG(args) PR_LOG(GetUserFontsLog(), PR_LOG_DEBUG, args)
|
||||
#define FONTSET_LOG_ENABLED() PR_LOG_TEST(GetUserFontsLog(), PR_LOG_DEBUG)
|
||||
|
||||
static uint64_t sFontSetGeneration = 0;
|
||||
|
||||
|
@ -177,8 +177,8 @@ gfxUserFontSet::AddFontFace(const nsAString& aFamilyName,
|
|||
aUnicodeRanges);
|
||||
family->AddFontEntry(proxyEntry);
|
||||
#ifdef PR_LOGGING
|
||||
if (LOG_ENABLED()) {
|
||||
LOG(("userfonts (%p) added (%s) with style: %s weight: %d stretch: %d",
|
||||
if (FONTSET_LOG_ENABLED()) {
|
||||
FONTSET_LOG(("userfonts (%p) added (%s) with style: %s weight: %d stretch: %d",
|
||||
this, NS_ConvertUTF16toUTF8(aFamilyName).get(),
|
||||
(aItalicStyle & NS_FONT_STYLE_ITALIC ? "italic" :
|
||||
(aItalicStyle & NS_FONT_STYLE_OBLIQUE ? "oblique" : "normal")),
|
||||
|
@ -531,7 +531,7 @@ gfxUserFontSet::LoadNext(gfxMixedFontFamily *aFamily,
|
|||
gfxPlatform::GetPlatform()->LookupLocalFont(aProxyEntry,
|
||||
currSrc.mLocalName);
|
||||
if (fe) {
|
||||
LOG(("userfonts (%p) [src %d] loaded local: (%s) for (%s) gen: %8.8x\n",
|
||||
FONTSET_LOG(("userfonts (%p) [src %d] loaded local: (%s) for (%s) gen: %8.8x\n",
|
||||
this, aProxyEntry->mSrcIndex,
|
||||
NS_ConvertUTF16toUTF8(currSrc.mLocalName).get(),
|
||||
NS_ConvertUTF16toUTF8(aFamily->Name()).get(),
|
||||
|
@ -545,7 +545,7 @@ gfxUserFontSet::LoadNext(gfxMixedFontFamily *aFamily,
|
|||
ReplaceFontEntry(aFamily, aProxyEntry, fe);
|
||||
return STATUS_LOADED;
|
||||
} else {
|
||||
LOG(("userfonts (%p) [src %d] failed local: (%s) for (%s)\n",
|
||||
FONTSET_LOG(("userfonts (%p) [src %d] failed local: (%s) for (%s)\n",
|
||||
this, aProxyEntry->mSrcIndex,
|
||||
NS_ConvertUTF16toUTF8(currSrc.mLocalName).get(),
|
||||
NS_ConvertUTF16toUTF8(aFamily->Name()).get()));
|
||||
|
@ -603,10 +603,10 @@ gfxUserFontSet::LoadNext(gfxMixedFontFamily *aFamily,
|
|||
rv = StartLoad(aFamily, aProxyEntry, &currSrc);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
#ifdef PR_LOGGING
|
||||
if (LOG_ENABLED()) {
|
||||
if (FONTSET_LOG_ENABLED()) {
|
||||
nsAutoCString fontURI;
|
||||
currSrc.mURI->GetSpec(fontURI);
|
||||
LOG(("userfonts (%p) [src %d] loading uri: (%s) for (%s)\n",
|
||||
FONTSET_LOG(("userfonts (%p) [src %d] loading uri: (%s) for (%s)\n",
|
||||
this, aProxyEntry->mSrcIndex, fontURI.get(),
|
||||
NS_ConvertUTF16toUTF8(aFamily->Name()).get()));
|
||||
}
|
||||
|
@ -638,7 +638,7 @@ gfxUserFontSet::LoadNext(gfxMixedFontFamily *aFamily,
|
|||
}
|
||||
|
||||
// all src's failed; mark this entry as unusable (so fallback will occur)
|
||||
LOG(("userfonts (%p) failed all src for (%s)\n",
|
||||
FONTSET_LOG(("userfonts (%p) failed all src for (%s)\n",
|
||||
this, NS_ConvertUTF16toUTF8(aFamily->Name()).get()));
|
||||
aProxyEntry->mLoadingState = gfxProxyFontEntry::LOADING_FAILED;
|
||||
|
||||
|
@ -717,10 +717,10 @@ gfxUserFontSet::LoadFont(gfxMixedFontFamily *aFamily,
|
|||
StoreUserFontData(fe, aProxy, GetPrivateBrowsing(),
|
||||
originalFullName, &metadata, metaOrigLen);
|
||||
#ifdef PR_LOGGING
|
||||
if (LOG_ENABLED()) {
|
||||
if (FONTSET_LOG_ENABLED()) {
|
||||
nsAutoCString fontURI;
|
||||
aProxy->mSrcList[aProxy->mSrcIndex].mURI->GetSpec(fontURI);
|
||||
LOG(("userfonts (%p) [src %d] loaded uri: (%s) for (%s) gen: %8.8x\n",
|
||||
FONTSET_LOG(("userfonts (%p) [src %d] loaded uri: (%s) for (%s) gen: %8.8x\n",
|
||||
this, aProxy->mSrcIndex, fontURI.get(),
|
||||
NS_ConvertUTF16toUTF8(aFamily->Name()).get(),
|
||||
uint32_t(mGeneration)));
|
||||
|
@ -730,10 +730,10 @@ gfxUserFontSet::LoadFont(gfxMixedFontFamily *aFamily,
|
|||
UserFontCache::CacheFont(fe);
|
||||
} else {
|
||||
#ifdef PR_LOGGING
|
||||
if (LOG_ENABLED()) {
|
||||
if (FONTSET_LOG_ENABLED()) {
|
||||
nsAutoCString fontURI;
|
||||
aProxy->mSrcList[aProxy->mSrcIndex].mURI->GetSpec(fontURI);
|
||||
LOG(("userfonts (%p) [src %d] failed uri: (%s) for (%s)"
|
||||
FONTSET_LOG(("userfonts (%p) [src %d] failed uri: (%s) for (%s)"
|
||||
" error making platform font\n",
|
||||
this, aProxy->mSrcIndex, fontURI.get(),
|
||||
NS_ConvertUTF16toUTF8(aFamily->Name()).get()));
|
||||
|
|
|
@ -525,7 +525,7 @@ ClipToRegionInternal(gfxContext* aContext, const nsIntRegion& aRegion,
|
|||
}
|
||||
|
||||
static TemporaryRef<Path>
|
||||
PathFromRegionInternal(gfx::DrawTarget* aTarget, const nsIntRegion& aRegion,
|
||||
PathFromRegionInternal(DrawTarget* aTarget, const nsIntRegion& aRegion,
|
||||
bool aSnap)
|
||||
{
|
||||
Matrix mat = aTarget->GetTransform();
|
||||
|
@ -567,7 +567,7 @@ PathFromRegionInternal(gfx::DrawTarget* aTarget, const nsIntRegion& aRegion,
|
|||
}
|
||||
|
||||
static void
|
||||
ClipToRegionInternal(gfx::DrawTarget* aTarget, const nsIntRegion& aRegion,
|
||||
ClipToRegionInternal(DrawTarget* aTarget, const nsIntRegion& aRegion,
|
||||
bool aSnap)
|
||||
{
|
||||
RefPtr<Path> path = PathFromRegionInternal(aTarget, aRegion, aSnap);
|
||||
|
@ -690,8 +690,8 @@ gfxUtils::GetYCbCrToRGBDestFormatAndSize(const PlanarYCbCrData& aData,
|
|||
gfxImageFormat& aSuggestedFormat,
|
||||
gfxIntSize& aSuggestedSize)
|
||||
{
|
||||
gfx::YUVType yuvtype =
|
||||
gfx::TypeFromSize(aData.mYSize.width,
|
||||
YUVType yuvtype =
|
||||
TypeFromSize(aData.mYSize.width,
|
||||
aData.mYSize.height,
|
||||
aData.mCbCrSize.width,
|
||||
aData.mCbCrSize.height);
|
||||
|
@ -704,15 +704,15 @@ gfxUtils::GetYCbCrToRGBDestFormatAndSize(const PlanarYCbCrData& aData,
|
|||
if (aSuggestedFormat == gfxImageFormatRGB16_565) {
|
||||
#if defined(HAVE_YCBCR_TO_RGB565)
|
||||
if (prescale &&
|
||||
!gfx::IsScaleYCbCrToRGB565Fast(aData.mPicX,
|
||||
!IsScaleYCbCrToRGB565Fast(aData.mPicX,
|
||||
aData.mPicY,
|
||||
aData.mPicSize.width,
|
||||
aData.mPicSize.height,
|
||||
aSuggestedSize.width,
|
||||
aSuggestedSize.height,
|
||||
yuvtype,
|
||||
gfx::FILTER_BILINEAR) &&
|
||||
gfx::IsConvertYCbCrToRGB565Fast(aData.mPicX,
|
||||
FILTER_BILINEAR) &&
|
||||
IsConvertYCbCrToRGB565Fast(aData.mPicX,
|
||||
aData.mPicY,
|
||||
aData.mPicSize.width,
|
||||
aData.mPicSize.height,
|
||||
|
@ -731,7 +731,7 @@ gfxUtils::GetYCbCrToRGBDestFormatAndSize(const PlanarYCbCrData& aData,
|
|||
if (aSuggestedFormat == gfxImageFormatRGB24) {
|
||||
/* ScaleYCbCrToRGB32 does not support a picture offset, nor 4:4:4 data.
|
||||
See bugs 639415 and 640073. */
|
||||
if (aData.mPicX != 0 || aData.mPicY != 0 || yuvtype == gfx::YV24)
|
||||
if (aData.mPicX != 0 || aData.mPicY != 0 || yuvtype == YV24)
|
||||
prescale = false;
|
||||
}
|
||||
if (!prescale) {
|
||||
|
@ -752,8 +752,8 @@ gfxUtils::ConvertYCbCrToRGB(const PlanarYCbCrData& aData,
|
|||
aData.mCbCrSize.width == (aData.mYSize.width + 1) >> 1) &&
|
||||
(aData.mCbCrSize.height == aData.mYSize.height ||
|
||||
aData.mCbCrSize.height == (aData.mYSize.height + 1) >> 1));
|
||||
gfx::YUVType yuvtype =
|
||||
gfx::TypeFromSize(aData.mYSize.width,
|
||||
YUVType yuvtype =
|
||||
TypeFromSize(aData.mYSize.width,
|
||||
aData.mYSize.height,
|
||||
aData.mCbCrSize.width,
|
||||
aData.mCbCrSize.height);
|
||||
|
@ -762,7 +762,7 @@ gfxUtils::ConvertYCbCrToRGB(const PlanarYCbCrData& aData,
|
|||
if (aDestSize != aData.mPicSize) {
|
||||
#if defined(HAVE_YCBCR_TO_RGB565)
|
||||
if (aDestFormat == gfxImageFormatRGB16_565) {
|
||||
gfx::ScaleYCbCrToRGB565(aData.mYChannel,
|
||||
ScaleYCbCrToRGB565(aData.mYChannel,
|
||||
aData.mCbChannel,
|
||||
aData.mCrChannel,
|
||||
aDestBuffer,
|
||||
|
@ -776,10 +776,10 @@ gfxUtils::ConvertYCbCrToRGB(const PlanarYCbCrData& aData,
|
|||
aData.mCbCrStride,
|
||||
aStride,
|
||||
yuvtype,
|
||||
gfx::FILTER_BILINEAR);
|
||||
FILTER_BILINEAR);
|
||||
} else
|
||||
#endif
|
||||
gfx::ScaleYCbCrToRGB32(aData.mYChannel,
|
||||
ScaleYCbCrToRGB32(aData.mYChannel,
|
||||
aData.mCbChannel,
|
||||
aData.mCrChannel,
|
||||
aDestBuffer,
|
||||
|
@ -791,12 +791,12 @@ gfxUtils::ConvertYCbCrToRGB(const PlanarYCbCrData& aData,
|
|||
aData.mCbCrStride,
|
||||
aStride,
|
||||
yuvtype,
|
||||
gfx::ROTATE_0,
|
||||
gfx::FILTER_BILINEAR);
|
||||
ROTATE_0,
|
||||
FILTER_BILINEAR);
|
||||
} else { // no prescale
|
||||
#if defined(HAVE_YCBCR_TO_RGB565)
|
||||
if (aDestFormat == gfxImageFormatRGB16_565) {
|
||||
gfx::ConvertYCbCrToRGB565(aData.mYChannel,
|
||||
ConvertYCbCrToRGB565(aData.mYChannel,
|
||||
aData.mCbChannel,
|
||||
aData.mCrChannel,
|
||||
aDestBuffer,
|
||||
|
@ -810,7 +810,7 @@ gfxUtils::ConvertYCbCrToRGB(const PlanarYCbCrData& aData,
|
|||
yuvtype);
|
||||
} else // aDestFormat != gfxImageFormatRGB16_565
|
||||
#endif
|
||||
gfx::ConvertYCbCrToRGB32(aData.mYChannel,
|
||||
ConvertYCbCrToRGB32(aData.mYChannel,
|
||||
aData.mCbChannel,
|
||||
aData.mCrChannel,
|
||||
aDestBuffer,
|
||||
|
|
|
@ -231,19 +231,30 @@ if CONFIG['INTEL_ARCHITECTURE']:
|
|||
]
|
||||
|
||||
SOURCES += [
|
||||
# Includes mac system header conflicting with point/size,
|
||||
# and includes glxXlibSurface.h which drags in Xrender.h
|
||||
'gfxASurface.cpp',
|
||||
# on X11, gfxDrawable.cpp includes X headers for an old workaround which
|
||||
# we could consider removing soon (affects Ubuntus older than 10.04 LTS)
|
||||
# which currently prevent it from joining UNIFIED_SOURCES.
|
||||
'gfxDrawable.cpp',
|
||||
# Uses FORCE_PR_LOG
|
||||
'gfxFontUtils.cpp',
|
||||
# Includes mac system header conflicting with point/size
|
||||
'gfxPlatform.cpp',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'gfx3DMatrix.cpp',
|
||||
'gfxAlphaRecovery.cpp',
|
||||
'gfxASurface.cpp',
|
||||
'gfxBaseSharedMemorySurface.cpp',
|
||||
'gfxBlur.cpp',
|
||||
'gfxCachedTempSurface.cpp',
|
||||
'gfxContext.cpp',
|
||||
'gfxDrawable.cpp',
|
||||
'gfxFont.cpp',
|
||||
'gfxFontFeatures.cpp',
|
||||
'gfxFontMissingGlyphs.cpp',
|
||||
'gfxFontTest.cpp',
|
||||
'gfxFontUtils.cpp',
|
||||
'gfxGradientCache.cpp',
|
||||
'gfxGraphiteShaper.cpp',
|
||||
'gfxHarfBuzzShaper.cpp',
|
||||
|
@ -251,7 +262,6 @@ SOURCES += [
|
|||
'gfxMatrix.cpp',
|
||||
'gfxPath.cpp',
|
||||
'gfxPattern.cpp',
|
||||
'gfxPlatform.cpp',
|
||||
'gfxPlatformFontList.cpp',
|
||||
'gfxRect.cpp',
|
||||
'gfxReusableImageSurfaceWrapper.cpp',
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
|
||||
using namespace mozilla;
|
||||
|
||||
#define LOG(args...) __android_log_print(ANDROID_LOG_INFO, "nsSurfaceTexture" , ## args)
|
||||
|
||||
// UGH
|
||||
static std::map<int, nsSurfaceTexture*> sInstances;
|
||||
static int sNextID = 0;
|
||||
|
@ -141,7 +139,7 @@ nsSurfaceTexture::Create(GLuint aTexture)
|
|||
|
||||
nsSurfaceTexture* st = new nsSurfaceTexture();
|
||||
if (!st->Init(aTexture)) {
|
||||
LOG("Failed to initialize nsSurfaceTexture");
|
||||
printf_stderr("Failed to initialize nsSurfaceTexture");
|
||||
delete st;
|
||||
st = nullptr;
|
||||
}
|
||||
|
@ -261,4 +259,4 @@ nsSurfaceTexture::NotifyFrameAvailable()
|
|||
}
|
||||
}
|
||||
|
||||
#endif // MOZ_WIDGET_ANDROID
|
||||
#endif // MOZ_WIDGET_ANDROID
|
||||
|
|
Загрузка…
Ссылка в новой задаче