Bug 1479456: Fix some non-unified bustage in gfx/thebes. r=jrmuizel
authorDavid Major <dmajor@mozilla.com>
Wed, 01 Aug 2018 13:02:18 -0400
changeset 429690 49512fc963b65fe99da12f73f1311eb54515ecb5
parent 429689 1cf1edca19998755d9cf291e11ecb9ef581c90cf
child 429691 fbe5a0e5be75bc052c66623ea2346d80dc74cf1a
push id34372
push usernerli@mozilla.com
push dateThu, 02 Aug 2018 08:55:28 +0000
treeherdermozilla-central@bd79b07f57a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1479456
milestone63.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 1479456: Fix some non-unified bustage in gfx/thebes. r=jrmuizel
gfx/2d/FontVariation.h
gfx/thebes/gfxFont.cpp
gfx/thebes/gfxFontInfoLoader.cpp
gfx/thebes/gfxFontMissingGlyphs.h
gfx/thebes/gfxPattern.cpp
gfx/thebes/gfxSVGGlyphs.cpp
gfx/thebes/gfxSkipChars.cpp
gfx/thebes/gfxTextRun.cpp
--- a/gfx/2d/FontVariation.h
+++ b/gfx/2d/FontVariation.h
@@ -2,16 +2,18 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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 MOZILLA_GFX_FONTVARIATION_H_
 #define MOZILLA_GFX_FONTVARIATION_H_
 
+#include <stdint.h>
+
 namespace mozilla {
 namespace gfx {
 
 // An OpenType variation tag and value pair
 struct FontVariation
 {
   uint32_t mTag;
   float mValue;
--- a/gfx/thebes/gfxFont.cpp
+++ b/gfx/thebes/gfxFont.cpp
@@ -41,16 +41,20 @@
 #include "gfxMathTable.h"
 #include "gfxSVGGlyphs.h"
 #include "gfx2DGlue.h"
 #include "TextDrawTarget.h"
 
 #include "GreekCasing.h"
 
 #include "cairo.h"
+#ifdef XP_WIN
+#include "cairo-win32.h"
+#include "gfxWindowsPlatform.h"
+#endif
 
 #include "harfbuzz/hb.h"
 #include "harfbuzz/hb-ot.h"
 
 #include <algorithm>
 #include <limits>
 #include <cmath>
 
--- a/gfx/thebes/gfxFontInfoLoader.cpp
+++ b/gfx/thebes/gfxFontInfoLoader.cpp
@@ -4,16 +4,20 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "gfxFontInfoLoader.h"
 #include "nsCRT.h"
 #include "nsIObserverService.h"
 #include "nsThreadUtils.h"              // for nsRunnable
 #include "gfxPlatformFontList.h"
 
+#ifdef XP_WIN
+#include <windows.h>
+#endif
+
 using namespace mozilla;
 using services::GetObserverService;
 
 #define LOG_FONTINIT(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontinit), \
                                LogLevel::Debug, args)
 #define LOG_FONTINIT_ENABLED() MOZ_LOG_TEST( \
                                    gfxPlatform::GetLog(eGfxLog_fontinit), \
                                    LogLevel::Debug)
--- a/gfx/thebes/gfxFontMissingGlyphs.h
+++ b/gfx/thebes/gfxFontMissingGlyphs.h
@@ -2,16 +2,17 @@
  * 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_FONTMISSINGGLYPHS_H
 #define GFX_FONTMISSINGGLYPHS_H
 
 #include "mozilla/Attributes.h"
+#include "mozilla/gfx/MatrixFwd.h"
 #include "mozilla/gfx/Rect.h"
 
 namespace mozilla {
 namespace gfx {
 class DrawTarget;
 class Pattern;
 } // namespace gfx
 } // namespace mozilla
@@ -19,16 +20,17 @@ class Pattern;
 /**
  * This class should not be instantiated. It's just a container
  * for some helper functions.
  */
 class gfxFontMissingGlyphs final
 {
     typedef mozilla::gfx::DrawTarget DrawTarget;
     typedef mozilla::gfx::Float Float;
+    typedef mozilla::gfx::Matrix Matrix;
     typedef mozilla::gfx::Pattern Pattern;
     typedef mozilla::gfx::Rect Rect;
 
     gfxFontMissingGlyphs() = delete; // prevent instantiation
 
 public:
     /**
      * Draw hexboxes for a missing glyph.
--- a/gfx/thebes/gfxPattern.cpp
+++ b/gfx/thebes/gfxPattern.cpp
@@ -177,30 +177,30 @@ gfxPattern::IsOpaque()
 
   if (static_cast<SurfacePattern*>(mGfxPattern.GetPattern())->mSurface->GetFormat() == SurfaceFormat::B8G8R8X8) {
     return true;
   }
   return false;
 }
 
 void
-gfxPattern::SetSamplingFilter(gfx::SamplingFilter filter)
+gfxPattern::SetSamplingFilter(mozilla::gfx::SamplingFilter filter)
 {
   if (mGfxPattern.GetPattern()->GetType() != PatternType::SURFACE) {
     return;
   }
 
   static_cast<SurfacePattern*>(mGfxPattern.GetPattern())->mSamplingFilter = filter;
 }
 
 SamplingFilter
 gfxPattern::SamplingFilter() const
 {
   if (mGfxPattern.GetPattern()->GetType() != PatternType::SURFACE) {
-    return gfx::SamplingFilter::GOOD;
+    return mozilla::gfx::SamplingFilter::GOOD;
   }
   return static_cast<const SurfacePattern*>(mGfxPattern.GetPattern())->mSamplingFilter;
 }
 
 bool
 gfxPattern::GetSolidColor(Color& aColorOut)
 {
   if (mGfxPattern.GetPattern()->GetType() == PatternType::COLOR) {
--- a/gfx/thebes/gfxSVGGlyphs.cpp
+++ b/gfx/thebes/gfxSVGGlyphs.cpp
@@ -35,17 +35,17 @@
 
 #define SVG_CONTENT_TYPE NS_LITERAL_CSTRING("image/svg+xml")
 #define UTF8_CHARSET NS_LITERAL_CSTRING("utf-8")
 
 using namespace mozilla;
 
 typedef mozilla::dom::Element Element;
 
-/* static */ const Color SimpleTextContextPaint::sZero = Color();
+/* static */ const mozilla::gfx::Color SimpleTextContextPaint::sZero;
 
 gfxSVGGlyphs::gfxSVGGlyphs(hb_blob_t *aSVGTable, gfxFontEntry *aFontEntry)
     : mSVGData(aSVGTable)
     , mFontEntry(aFontEntry)
 {
     unsigned int length;
     const char* svgData = hb_blob_get_data(mSVGData, &length);
     mHeader = reinterpret_cast<const Header*>(svgData);
--- a/gfx/thebes/gfxSkipChars.cpp
+++ b/gfx/thebes/gfxSkipChars.cpp
@@ -1,15 +1,16 @@
 /* -*- 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/. */
 
 #include "gfxSkipChars.h"
 #include "mozilla/BinarySearch.h"
+#include "mozilla/gfx/Logging.h"
 
 struct SkippedRangeStartComparator
 {
     const uint32_t mOffset;
     explicit SkippedRangeStartComparator(const uint32_t aOffset) : mOffset(aOffset) {}
     int operator()(const gfxSkipChars::SkippedRange& aRange) const {
         return (mOffset < aRange.Start()) ? -1 : 1;
     }
--- a/gfx/thebes/gfxTextRun.cpp
+++ b/gfx/thebes/gfxTextRun.cpp
@@ -1,16 +1,17 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* vim: set ts=4 et sw=4 tw=80: */
 /* 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/. */
 
 #include "gfxTextRun.h"
 #include "gfxGlyphExtents.h"
+#include "gfxHarfBuzzShaper.h"
 #include "gfxPlatformFontList.h"
 #include "gfxUserFontSet.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/gfx/PathHelpers.h"
 #include "mozilla/Sprintf.h"
 
 #include "gfxContext.h"
 #include "gfxFontConstants.h"