Bug 1389733 - Add missing Skia compile guards. r=lsalzman
authorJan Beich <jbeich@FreeBSD.org>
Sat, 12 Aug 2017 04:31:21 +0000
changeset 424141 f616ad97907a2e2c81aa5452ff940530704ae4ff
parent 424140 9084b3bb0e78efae2701e10b9187cdba14bbc565
child 424142 ce9ca5e8f2d16b29e582628320a78d68d5f2138f
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsalzman
bugs1389733
milestone57.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 1389733 - Add missing Skia compile guards. r=lsalzman MozReview-Commit-ID: BXYxGjj0j73
gfx/2d/ScaledFontBase.cpp
image/Downscaler.h
--- a/gfx/2d/ScaledFontBase.cpp
+++ b/gfx/2d/ScaledFontBase.cpp
@@ -170,16 +170,17 @@ ScaledFontBase::GetPathForGlyphs(const G
 #endif
 #ifdef USE_SKIA
   RefPtr<PathBuilder> builder = aTarget->CreatePathBuilder();
   SkPath skPath = GetSkiaPathForGlyphs(aBuffer);
   RefPtr<Path> path = MakeAndAddRef<PathSkia>(skPath, FillRule::FILL_WINDING);
   path->StreamToSink(builder);
   return builder->Finish();
 #endif
+  return nullptr;
 }
 
 void
 ScaledFontBase::CopyGlyphsToBuilder(const GlyphBuffer &aBuffer, PathBuilder *aBuilder, const Matrix *aTransformHint)
 {
   BackendType backendType = aBuilder->GetBackendType();
 #ifdef USE_SKIA
   if (backendType == BackendType::SKIA) {
@@ -213,24 +214,26 @@ ScaledFontBase::CopyGlyphsToBuilder(cons
     cairo_glyph_path(ctx, &glyphs[0], aBuffer.mNumGlyphs);
 
     RefPtr<PathCairo> cairoPath = new PathCairo(ctx);
     cairo_destroy(ctx);
 
     cairoPath->AppendPathToBuilder(builder);
     return;
   }
+#endif
+#ifdef USE_SKIA
   if (backendType == BackendType::RECORDING) {
     SkPath skPath = GetSkiaPathForGlyphs(aBuffer);
     RefPtr<Path> path = MakeAndAddRef<PathSkia>(skPath, FillRule::FILL_WINDING);
     path->StreamToSink(aBuilder);
     return;
   }
+#endif
   MOZ_ASSERT(false, "Path not being copied");
-#endif
 }
 
 void
 ScaledFontBase::GetGlyphDesignMetrics(const uint16_t* aGlyphs, uint32_t aNumGlyphs, GlyphMetrics* aGlyphMetrics)
 {
 #ifdef USE_CAIRO_SCALED_FONT
   if (mScaledFont) {
     for (uint32_t i = 0; i < aNumGlyphs; i++) {
--- a/image/Downscaler.h
+++ b/image/Downscaler.h
@@ -11,17 +11,19 @@
 
 #ifndef mozilla_image_Downscaler_h
 #define mozilla_image_Downscaler_h
 
 #include "mozilla/Maybe.h"
 #include "mozilla/UniquePtr.h"
 #include "gfxPoint.h"
 #include "nsRect.h"
+#ifdef MOZ_ENABLE_SKIA
 #include "mozilla/gfx/ConvolutionFilter.h"
+#endif
 
 namespace mozilla {
 namespace image {
 
 /**
  * DownscalerInvalidRect wraps two invalidation rects: one in terms of the
  * original image size, and one in terms of the target size.
  */