summarylogtreecommitdiffstats
path: root/harmony-fix.diff
diff options
context:
space:
mode:
authorDaniel Egeberg2018-08-26 17:02:58 +0200
committerDaniel Egeberg2018-08-26 17:06:30 +0200
commit31b9e38d7927b1e982a2fd2b51220b40ff3c96dc (patch)
tree58ca8dd6f97d22b2958754fbc20caf8e81296baf /harmony-fix.diff
downloadaur-qt5-pmp-webengine.tar.gz
Initial commit
Diffstat (limited to 'harmony-fix.diff')
-rw-r--r--harmony-fix.diff69
1 files changed, 69 insertions, 0 deletions
diff --git a/harmony-fix.diff b/harmony-fix.diff
new file mode 100644
index 000000000000..803730f0d110
--- /dev/null
+++ b/harmony-fix.diff
@@ -0,0 +1,69 @@
+diff -u -r qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp qtwebengine-opensource-src-5.9.1-ftfixes/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp
+--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp 2017-09-19 17:38:43.659642835 +0200
++++ qtwebengine-opensource-src-5.9.1-ftfixes/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp 2017-09-19 17:38:50.492991631 +0200
+@@ -80,7 +80,7 @@
+
+ class FreeTypeLibrary : SkNoncopyable {
+ public:
+- FreeTypeLibrary() : fLibrary(nullptr), fIsLCDSupported(false), fLCDExtra(0) {
++ FreeTypeLibrary() : fLibrary(nullptr) {
+ if (FT_New_Library(&gFTMemory, &fLibrary)) {
+ return;
+ }
+@@ -90,8 +90,6 @@
+ // Default { 0x10, 0x40, 0x70, 0x40, 0x10 } adds up to 0x110, simulating ink spread.
+ // SetLcdFilter must be called before SetLcdFilterWeights.
+ if (FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT) == 0) {
+- fIsLCDSupported = true;
+- fLCDExtra = 2; //Using a filter adds one full pixel to each side.
+
+ #ifdef SK_FONTHOST_FREETYPE_USE_NORMAL_LCD_FILTER
+ // Adds to 0x110 simulating ink spread, but provides better results than default.
+@@ -124,13 +122,9 @@
+ }
+
+ FT_Library library() { return fLibrary; }
+- bool isLCDSupported() { return fIsLCDSupported; }
+- int lcdExtra() { return fLCDExtra; }
+
+ 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.
+@@ -633,17 +627,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
+@@ -1046,11 +1029,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;
+ }
+ }
+ }