Bug 1389733 - Add missing Skia compile guards. r=lsalzman, a=gchang
authorJan Beich <jbeich@FreeBSD.org>
Sat, 12 Aug 2017 04:31:21 +0000
changeset 421206 ec091dee71a261abc7d8b91f1213eca6686f5356
parent 421205 1a169abe9d0a50fdadd60f62bea934e9f0b0460a
child 421207 2f22606fa551e802fb6a6f4fdbf8fb8367467679
push id7622
push userryanvm@gmail.com
push dateWed, 16 Aug 2017 18:27:56 +0000
treeherdermozilla-beta@2f22606fa551 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsalzman, gchang
bugs1389733
milestone56.0
Bug 1389733 - Add missing Skia compile guards. r=lsalzman, a=gchang 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.
  */