Bug 1321022 pt 1 - Add a gfxFontVariation struct to represent a <variation-axis, value> pair. r=dholbert
authorJonathan Kew <jkew@mozilla.com>
Sat, 03 Dec 2016 12:18:25 +0000
changeset 325165 ee75de0e12acc2c7557daa437fdb4d5c53393304
parent 325164 612dfd756ef78a09827ad2287d4635b50368ce81
child 325166 c0d84787e5643ab00cf79018e8f80b759b57a95b
push id84613
push userjkew@mozilla.com
push dateSat, 03 Dec 2016 12:25:40 +0000
treeherdermozilla-inbound@870d19bb4759 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1321022
milestone53.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 1321022 pt 1 - Add a gfxFontVariation struct to represent a <variation-axis, value> pair. r=dholbert
gfx/thebes/gfxFontVariations.h
gfx/thebes/moz.build
new file mode 100644
--- /dev/null
+++ b/gfx/thebes/gfxFontVariations.h
@@ -0,0 +1,22 @@
+/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef GFX_FONT_VARIATIONS_H
+#define GFX_FONT_VARIATIONS_H
+
+// An OpenType variation tag and value pair
+struct gfxFontVariation {
+    uint32_t mTag;
+    float mValue;
+};
+
+inline bool
+operator==(const gfxFontVariation& a, const gfxFontVariation& b)
+{
+    return (a.mTag == b.mTag) && (a.mValue == b.mValue);
+}
+
+#endif
--- a/gfx/thebes/moz.build
+++ b/gfx/thebes/moz.build
@@ -21,16 +21,17 @@ EXPORTS += [
     'gfxFontConstants.h',
     'gfxFontEntry.h',
     'gfxFontFamilyList.h',
     'gfxFontFeatures.h',
     'gfxFontInfoLoader.h',
     'gfxFontPrefLangList.h',
     'gfxFontTest.h',
     'gfxFontUtils.h',
+    'gfxFontVariations.h',
     'gfxGradientCache.h',
     'gfxImageSurface.h',
     'gfxLineSegment.h',
     'gfxMathTable.h',
     'gfxMatrix.h',
     'gfxPattern.h',
     'gfxPlatform.h',
     'gfxPoint.h',