Bug 1145934 - Update obsolete glyph-run assertion. r=jdaggett
authorJonathan Kew <jkew@mozilla.com>
Mon, 23 Mar 2015 11:43:38 +0000
changeset 265363 950b3418cbf96cd29c7daaed92c4aec5a7000b6a
parent 265362 a635ffc071d051fd6901d436e562e95c90e95012
child 265364 834936a75fb276246fb757d96d50d1cd440f8eff
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdaggett
bugs1145934
milestone39.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 1145934 - Update obsolete glyph-run assertion. r=jdaggett
gfx/thebes/gfxTextRun.cpp
--- a/gfx/thebes/gfxTextRun.cpp
+++ b/gfx/thebes/gfxTextRun.cpp
@@ -1226,23 +1226,26 @@ gfxTextRun::CopyGlyphDataFrom(gfxTextRun
             }
         }
         dstGlyphs[i] = g;
     }
 
     // Copy glyph runs
     GlyphRunIterator iter(aSource, aStart, aLength);
 #ifdef DEBUG
-    gfxFont *lastFont = nullptr;
+    GlyphRun *prevRun = nullptr;
 #endif
     while (iter.NextRun()) {
         gfxFont *font = iter.GetGlyphRun()->mFont;
-        NS_ASSERTION(font != lastFont, "Glyphruns not coalesced?");
+        NS_ASSERTION(!prevRun || prevRun->mFont != iter.GetGlyphRun()->mFont ||
+                     prevRun->mMatchType != iter.GetGlyphRun()->mMatchType ||
+                     prevRun->mOrientation != iter.GetGlyphRun()->mOrientation,
+                     "Glyphruns not coalesced?");
 #ifdef DEBUG
-        lastFont = font;
+        prevRun = iter.GetGlyphRun();
         uint32_t end = iter.GetStringEnd();
 #endif
         uint32_t start = iter.GetStringStart();
 
         // These used to be NS_ASSERTION()s, but WARNING is more appropriate.
         // Although it's unusual (and not desirable), it's possible for us to assign
         // different fonts to a base character and a following diacritic.
         // Example on OSX 10.5/10.6 with default fonts installed: