[arch-commits] Commit in chromium/trunk (PKGBUILD chromium-skia-harmony.patch)
Evangelos Foutras
foutrelis at archlinux.org
Sun Jan 7 07:21:05 UTC 2018
Date: Sunday, January 7, 2018 @ 07:21:04
Author: foutrelis
Revision: 314180
upgpkg: chromium 63.0.3239.132-2
Make subpixel rendering work again; it broke after switching to system
FreeType (FS#56980).
Added:
chromium/trunk/chromium-skia-harmony.patch
Modified:
chromium/trunk/PKGBUILD
-----------------------------+
PKGBUILD | 7 +++
chromium-skia-harmony.patch | 77 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 83 insertions(+), 1 deletion(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-01-07 01:15:43 UTC (rev 314179)
+++ PKGBUILD 2018-01-07 07:21:04 UTC (rev 314180)
@@ -6,7 +6,7 @@
pkgname=chromium
pkgver=63.0.3239.132
-pkgrel=1
+pkgrel=2
_launcher_ver=5
pkgdesc="A web browser built for speed, simplicity, and security"
arch=('x86_64')
@@ -26,6 +26,7 @@
chromium-launcher-$_launcher_ver.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver.tar.gz
chromium-$pkgver.txt::https://chromium.googlesource.com/chromium/src.git/+/$pkgver?format=TEXT
chromium-omnibox-unescape-fragment.patch
+ chromium-skia-harmony.patch
chromium-clang-r1.patch
chromium-webrtc-r0.patch
chromium-exclude_unwind_tables.patch
@@ -34,6 +35,7 @@
'4dc3428f2c927955d9ae117f2fb24d098cc6dd67adb760ac9c82b522ec8b0587'
'ab330f30c14ea3b5e77976d674304b91cfb02251fe8771cecb0bb4092c7f6b74'
'814eb2cecb10cb697e24036b08aac41e88d0e38971741f9e946200764e2401ae'
+ 'feca54ab09ac0fc9d0626770a6b899a6ac5a12173c7d0c1005bc3964ec83e7b3'
'ab5368a3e3a67fa63b33fefc6788ad5b4a79089ef4db1011a14c3bee9fdf70c6'
'bcb2f4588cf5dcf75cde855c7431e94fdcc34bdd68b876a90f65ab9938594562'
'e53dc6f259acd39df13874f8a0f440528fae764b859dd71447991a5b1fac7c9c'
@@ -99,6 +101,9 @@
# https://crbug.com/789163
patch -Np1 -i ../chromium-omnibox-unescape-fragment.patch
+ # https://crbug.com/skia/6663#c10
+ patch -Np4 -i ../chromium-skia-harmony.patch
+
# Fixes from Gentoo
patch -Np1 -i ../chromium-clang-r1.patch
patch -Np1 -i ../chromium-webrtc-r0.patch
Added: chromium-skia-harmony.patch
===================================================================
--- chromium-skia-harmony.patch (rev 0)
+++ chromium-skia-harmony.patch 2018-01-07 07:21:04 UTC (rev 314180)
@@ -0,0 +1,77 @@
+--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp.orig 2017-10-10 17:42:06.956950985 +0200
++++ qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp 2017-10-10 17:46:05.824187787 +0200
+@@ -99,8 +99,6 @@
+ FreeTypeLibrary()
+ : fGetVarDesignCoordinates(nullptr)
+ , fLibrary(nullptr)
+- , fIsLCDSupported(false)
+- , fLCDExtra(0)
+ {
+ if (FT_New_Library(&gFTMemory, &fLibrary)) {
+ return;
+@@ -147,12 +145,7 @@
+ }
+ #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) {
+@@ -161,8 +153,6 @@
+ }
+
+ 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.
+@@ -173,8 +163,6 @@
+
+ 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.
+@@ -704,17 +692,6 @@
+ 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();
+- }
+-
+ SkPaint::Hinting h = rec->getHinting();
+ if (SkPaint::kFull_Hinting == h && !isLCD(*rec)) {
+ // collapse full->normal hinting if we're not doing LCD
+@@ -1115,11 +1092,11 @@
+ void SkScalerContext_FreeType::updateGlyphIfLCD(SkGlyph* glyph) {
+ if (isLCD(fRec)) {
+ 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;
+ }
+ }
+ }
More information about the arch-commits
mailing list