Bug 1494291 - set number of variations when adding blob fonts. r=me
authorLee Salzman <lsalzman@mozilla.com>
Wed, 26 Sep 2018 16:33:01 -0400
changeset 438391 6497c6dbf390d4e2fe12db5b4718aab94fe7b703
parent 438390 712cd59c243762c23248cc07c6fcf300fa2bf65a
child 438392 50c67bb42d237c19acad051802389180e1700a19
push id34719
push usershindli@mozilla.com
push dateThu, 27 Sep 2018 03:14:06 +0000
treeherdermozilla-central@024521c589d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1494291
milestone64.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 1494291 - set number of variations when adding blob fonts. r=me
gfx/webrender_bindings/Moz2DImageRenderer.cpp
--- a/gfx/webrender_bindings/Moz2DImageRenderer.cpp
+++ b/gfx/webrender_bindings/Moz2DImageRenderer.cpp
@@ -219,16 +219,17 @@ AddBlobFont(WrFontInstanceKey aInstanceK
     font.mSize = aSize;
     if (aOptions) {
       font.mOptions = Some(*aOptions);
     }
     if (aPlatformOptions) {
       font.mPlatformOptions = Some(*aPlatformOptions);
     }
     if (aNumVariations) {
+      font.mNumVariations = aNumVariations;
       font.mVariations.reset(new gfx::FontVariation[aNumVariations]);
       PodCopy(font.mVariations.get(), reinterpret_cast<const gfx::FontVariation*>(aVariations), aNumVariations);
     }
   }
 }
 
 void
 DeleteBlobFont(WrFontInstanceKey aKey)