Bug 1453653 - Cherry-pick an upstream FreeType fix. r=jfkthame
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 12 Apr 2018 09:48:31 -0400
changeset 413055 3d736c05f9568c378edc7872127511a0a8f193b5
parent 413054 5e672478d592f6399993290719ec296efc292b77
child 413056 e4a176915c3c4443afbb84545acd27d505471898
push id33832
push userrgurzau@mozilla.com
push dateThu, 12 Apr 2018 23:09:18 +0000
treeherdermozilla-central@da809ecceaf3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame
bugs1453653
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1453653 - Cherry-pick an upstream FreeType fix. r=jfkthame
modules/freetype2/README.moz-patches
modules/freetype2/src/truetype/ttinterp.c
--- a/modules/freetype2/README.moz-patches
+++ b/modules/freetype2/README.moz-patches
@@ -1,11 +1,12 @@
 This directory contains FreeType v2.9 downloaded from
 https://download.savannah.gnu.org/releases/freetype/
 
 The following post-2.9 commits have been cherry-picked from
-the upstream FreeType repository (see bug 1434697, bug 1438522):
+the upstream FreeType repository (see bug 1434697, bug 1438522, bug 1453653):
 
 http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=994eb2b34934bc5face9f83b2d3b12cf7a9262ab
 http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=cc2f3cdecff5a351e7e8961b9f2e389ab740231a
 http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=4a03f17449ae45f0dacf4de4694ccd6e5e1b24d1
 http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=68dddcdcbe18a08d778026efc01b1369e35cbf6a
 http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=29c759284e305ec428703c9a5831d0b1fc3497ef
+http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=bd9400bd464f6cd7c74f52ece1c1065fe2a87aab
--- a/modules/freetype2/src/truetype/ttinterp.c
+++ b/modules/freetype2/src/truetype/ttinterp.c
@@ -2160,26 +2160,26 @@
     FT_F26Dot6  val;
 
 
     if ( distance >= 0 )
     {
       val = ADD_LONG( distance,
                       exc->threshold - exc->phase + compensation ) &
               -exc->period;
-      val += exc->phase;
+      val = ADD_LONG( val, exc->phase );
       if ( val < 0 )
         val = exc->phase;
     }
     else
     {
       val = NEG_LONG( SUB_LONG( exc->threshold - exc->phase + compensation,
                                 distance ) &
                         -exc->period );
-      val -= exc->phase;
+      val = SUB_LONG( val, exc->phase );
       if ( val > 0 )
         val = -exc->phase;
     }
 
     return val;
   }
 
 
@@ -2211,26 +2211,26 @@
     FT_F26Dot6  val;
 
 
     if ( distance >= 0 )
     {
       val = ( ADD_LONG( distance,
                         exc->threshold - exc->phase + compensation ) /
                 exc->period ) * exc->period;
-      val += exc->phase;
+      val = ADD_LONG( val, exc->phase );
       if ( val < 0 )
         val = exc->phase;
     }
     else
     {
       val = NEG_LONG( ( SUB_LONG( exc->threshold - exc->phase + compensation,
                                   distance ) /
                           exc->period ) * exc->period );
-      val -= exc->phase;
+      val = SUB_LONG( val, exc->phase );
       if ( val > 0 )
         val = -exc->phase;
     }
 
     return val;
   }