Files
chromium-dev/chromium-skia-system-fontconfig.patch
Tomáš Chvátal 5fa9bed719 Accepting request 670066 from network:chromium
- Add patch to fix aarch64 build:
  * chromium-crashpad-fix_aarch64.patch

- Refresh patch:
  * chromium-non-void-return.patch
- Add new patch to fix aarch64 build:
  * chromium-fix_swiftshader.patch
- Up to 72.0.3626.14

- Update chromium-vaapi.patch
- Update chromium-system-icu.patch
- Rework aarch64 build requirements
- Reduce jumbo_file_merge_limit to 8 for aarch64 to avoid OOM
- Fix again aarch64 skia build:
- Up to 71.0.3551.3
- Up to 70.0.3528.4
- Up to chromium-70.0.3521.2
- Add patch trying to build with system icu:
  * chromium-system-icu.patch
- Up to chromium-70.0.3510.0
- Up to 69.0.3497.23
- Up to chromium-69.0.3497.12
- Add patch to fix aarch64 build:
  * chromium-vpx-aarch64.patch 
- Up to 69.0.3493.3
- Up to 69.0.3486.0
- Up to 69.0.3472.3
- Up to 69.0.3452.0
- Up to 68.0.3440.17
- Up to 68.0.3438.3

OBS-URL: https://build.opensuse.org/request/show/670066
OBS-URL: https://build.opensuse.org/package/show/network:chromium/chromium?expand=0&rev=1217
2019-01-30 08:50:03 +00:00

80 lines
3.0 KiB
Diff

Index: chromium-72.0.3608.4/third_party/skia/src/ports/SkFontHost_FreeType.cpp
===================================================================
--- chromium-72.0.3608.4.orig/third_party/skia/src/ports/SkFontHost_FreeType.cpp
+++ chromium-72.0.3608.4/third_party/skia/src/ports/SkFontHost_FreeType.cpp
@@ -121,8 +121,6 @@ public:
: fGetVarDesignCoordinates(nullptr)
, fGetVarAxisFlags(nullptr)
, fLibrary(nullptr)
- , fIsLCDSupported(false)
- , fLCDExtra(0)
{
if (FT_New_Library(&gFTMemory, &fLibrary)) {
return;
@@ -182,12 +180,7 @@ public:
}
#endif
- // Setup LCD filtering. This reduces color fringes for LCD smoothed glyphs.
- // The default has changed over time, so this doesn't mean the same thing to all users.
- if (FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT) == 0) {
- fIsLCDSupported = true;
- fLCDExtra = 2; //Using a filter adds one full pixel to each side.
- }
+ FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT);
}
~FreeTypeLibrary() {
if (fLibrary) {
@@ -196,8 +189,6 @@ public:
}
FT_Library library() { return fLibrary; }
- bool isLCDSupported() { return fIsLCDSupported; }
- int lcdExtra() { return fLCDExtra; }
// FT_Get_{MM,Var}_{Blend,Design}_Coordinates were added in FreeType 2.7.1.
// Prior to this there was no way to get the coordinates out of the FT_Face.
@@ -214,8 +205,6 @@ public:
private:
FT_Library fLibrary;
- bool fIsLCDSupported;
- int fLCDExtra;
// FT_Library_SetLcdFilterWeights was introduced in FreeType 2.4.0.
// The following platforms provide FreeType of at least 2.4.0.
@@ -713,17 +702,6 @@ void SkTypeface_FreeType::onFilterRec(Sk
rec->fTextSize = SkIntToScalar(1 << 14);
}
- if (isLCD(*rec)) {
- // TODO: re-work so that FreeType is set-up and selected by the SkFontMgr.
- SkAutoMutexAcquire ama(gFTMutex);
- ref_ft_library();
- if (!gFTLibrary->isLCDSupported()) {
- // If the runtime Freetype library doesn't support LCD, disable it here.
- rec->fMaskFormat = SkMask::kA8_Format;
- }
- unref_ft_library();
- }
-
SkFontHinting h = rec->getHinting();
if (kFull_SkFontHinting == h && !isLCD(*rec)) {
// collapse full->normal hinting if we're not doing LCD
@@ -1137,11 +1115,11 @@ bool SkScalerContext_FreeType::getCBoxFo
void SkScalerContext_FreeType::updateGlyphIfLCD(SkGlyph* glyph) {
if (glyph->fMaskFormat == SkMask::kLCD16_Format) {
if (fLCDIsVert) {
- glyph->fHeight += gFTLibrary->lcdExtra();
- glyph->fTop -= gFTLibrary->lcdExtra() >> 1;
+ glyph->fHeight += 2;
+ glyph->fTop -= 1;
} else {
- glyph->fWidth += gFTLibrary->lcdExtra();
- glyph->fLeft -= gFTLibrary->lcdExtra() >> 1;
+ glyph->fWidth += 2;
+ glyph->fLeft -= 1;
}
}
}