Bug 1236323 - Part 2: Suppress -Wimplicit-fallthrough warnings in gfx/ from Skia header files. r=nical
authorChris Peterson <cpeterson@mozilla.com>
Fri, 08 Jan 2016 00:43:58 -0800
changeset 280264 9f62f4be98b09d3ec40d1267b85287ecbd52c06e
parent 280263 32178f8eb397198c44a08795376d117c8162f35e
child 280265 5f99e2208a3b5ef44fc80681caef563f6ec80b77
push id29906
push userryanvm@gmail.com
push dateSun, 17 Jan 2016 19:40:11 +0000
treeherdermozilla-central@b92f5032b4fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1236323
milestone46.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 1236323 - Part 2: Suppress -Wimplicit-fallthrough warnings in gfx/ from Skia header files. r=nical
gfx/2d/moz.build
gfx/gl/moz.build
gfx/thebes/moz.build
--- a/gfx/2d/moz.build
+++ b/gfx/2d/moz.build
@@ -86,23 +86,28 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wi
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'windows':
     SOURCES += [
         'JobScheduler_posix.cpp',
     ]
 
 if CONFIG['MOZ_ENABLE_SKIA']:
     UNIFIED_SOURCES += [
         'convolver.cpp',
+    ]
+    SOURCES += [
         'DrawTargetSkia.cpp',
+        'image_operations.cpp', # Uses _USE_MATH_DEFINES
         'PathSkia.cpp',
         'SourceSurfaceSkia.cpp',
     ]
-    SOURCES += [
-        'image_operations.cpp', # Uses _USE_MATH_DEFINES
-    ]
+    if CONFIG['CLANG_CXX']:
+        # Suppress warnings from Skia header files.
+        SOURCES['DrawTargetSkia.cpp'].flags += ['-Wno-implicit-fallthrough']
+        SOURCES['PathSkia.cpp'].flags += ['-Wno-implicit-fallthrough']
+        SOURCES['SourceSurfaceSkia.cpp'].flags += ['-Wno-implicit-fallthrough']
     EXPORTS.mozilla.gfx += [
         'HelpersSkia.h',
         'RefPtrSkia.h',
     ]
 
 # Are we targeting x86 or x64?  If so, build SSE2 files.
 if CONFIG['INTEL_ARCHITECTURE']:
     SOURCES += [
@@ -138,17 +143,16 @@ UNIFIED_SOURCES += [
     'DrawEventRecorder.cpp',
     'DrawingJob.cpp',
     'DrawTarget.cpp',
     'DrawTargetCairo.cpp',
     'DrawTargetCapture.cpp',
     'DrawTargetDual.cpp',
     'DrawTargetRecording.cpp',
     'DrawTargetTiled.cpp',
-    'Factory.cpp',
     'FilterNodeSoftware.cpp',
     'FilterProcessing.cpp',
     'FilterProcessingScalar.cpp',
     'ImageScaling.cpp',
     'JobScheduler.cpp',
     'Matrix.cpp',
     'Path.cpp',
     'PathCairo.cpp',
@@ -161,16 +165,23 @@ UNIFIED_SOURCES += [
     'ScaledFontBase.cpp',
     'ScaledFontCairo.cpp',
     'SFNTData.cpp',
     'SFNTNameTable.cpp',
     'SourceSurfaceCairo.cpp',
     'SourceSurfaceRawData.cpp',
 ]
 
+SOURCES += [
+    'Factory.cpp', # Need to suppress warnings in Skia header files.
+]
+
+if CONFIG['CLANG_CXX']:
+    SOURCES['Factory.cpp'].flags += ['-Wno-implicit-fallthrough']
+
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     EXPORTS.mozilla.gfx += [
         'QuartzSupport.h',
     ]
     SOURCES += [
         'MacIOSurface.cpp',
         'QuartzSupport.mm',
     ]
--- a/gfx/gl/moz.build
+++ b/gfx/gl/moz.build
@@ -75,19 +75,22 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
     ]
     UNIFIED_SOURCES += [
         'GLContextProviderWGL.cpp',
         'SharedSurfaceANGLE.cpp',
         'SharedSurfaceD3D11Interop.cpp',
     ]
 if CONFIG['MOZ_ENABLE_SKIA_GPU']:
     EXPORTS += ['SkiaGLGlue.h']
-    UNIFIED_SOURCES += [
+    SOURCES += [
         'SkiaGLGlue.cpp',
     ]
+    if CONFIG['CLANG_CXX']:
+        # Suppress warnings from Skia header files.
+        SOURCES['SkiaGLGlue.cpp'].flags += ['-Wno-implicit-fallthrough']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
     UNIFIED_SOURCES += ['SharedSurfaceGralloc.cpp']
     EXPORTS += ['SharedSurfaceGralloc.h']
     LOCAL_INCLUDES += ['/widget/gonk']
     LOCAL_INCLUDES += ['%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], 'hardware/libhardware/include')]
 
 if gl_provider == 'CGL':
--- a/gfx/thebes/moz.build
+++ b/gfx/thebes/moz.build
@@ -302,8 +302,12 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr
     DEFINES['MOZ_USING_ANDROID_JAVA_WIDGETS'] = True
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'qt'):
     CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
 
 LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
 
 DEFINES['GRAPHITE2_STATIC'] = True
+
+if CONFIG['CLANG_CXX']:
+    # Suppress warnings from Skia header files.
+    SOURCES['gfxPlatform.cpp'].flags += ['-Wno-implicit-fallthrough']