Bug 874682 - Ensure SkThread_pthreads is built on platforms which use pthreads r=bjacob
authorGeorge Wright <gw@gwright.org.uk>
Wed, 29 May 2013 18:47:59 -0400
changeset 134134 7d8807db11d242262dd8dd804c7da6c5ad4fb497
parent 134133 ae2b07dfd3d09664007d34262f19b7deca626201
child 134135 73ef965a7b666fb4877c082115fbebf48c99def2
push id24784
push useremorley@mozilla.com
push dateThu, 06 Jun 2013 09:09:24 +0000
treeherdermozilla-central@10a6781c41e4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbjacob
bugs874682
milestone24.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 874682 - Ensure SkThread_pthreads is built on platforms which use pthreads r=bjacob
gfx/skia/Makefile.in
gfx/skia/moz.build
--- a/gfx/skia/Makefile.in
+++ b/gfx/skia/Makefile.in
@@ -52,28 +52,30 @@ VPATH += \
 	$(srcdir)/src/effects/gradients \
 	$(srcdir)/src/utils \
 	$(srcdir)/src/utils/mac \
 	$(srcdir)/src/sfnt \
 	$(NULL)
 
 ifeq (android,$(MOZ_WIDGET_TOOLKIT))
 OS_CXXFLAGS += $(CAIRO_FT_CFLAGS)
-DEFINES += -DSK_USE_POSIX_THREADS=1
 endif
 
 ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT))
 OS_CXXFLAGS += $(MOZ_PANGO_CFLAGS)
 endif
 
 ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
 OS_CXXFLAGS += $(MOZ_PANGO_CFLAGS)
+ifeq (Linux,$(OS_TARGET))
+DEFINES += -DSK_USE_POSIX_THREADS=1
+endif
 endif
 
-ifeq (Linux,$(OS_TARGET))
+ifeq ($(MOZ_WIDGET_TOOLKIT),$(findstring $(MOZ_WIDGET_TOOLKIT),android gtk2 gonk cocoa))
 DEFINES += -DSK_USE_POSIX_THREADS=1
 endif
 
 ifeq (windows,$(MOZ_WIDGET_TOOLKIT))
 DEFINES += -DSKIA_IMPLEMENTATION=1 -DGR_IMPLEMENTATION=1
 endif
 
 ifneq (,$(INTEL_ARCHITECTURE))
--- a/gfx/skia/moz.build
+++ b/gfx/skia/moz.build
@@ -149,53 +149,61 @@ EXPORTS.skia += [
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     EXPORTS.skia += [
         'include/ports/SkTypeface_mac.h',
     ]
     CPP_SOURCES += [
         'SkFontHost_mac_coretext.cpp',
         'SkStream_mac.cpp',
+        'SkThread_pthread.cpp',
         'SkTime_Unix.cpp',
     ]
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     EXPORTS.skia += [
         'include/config/sk_stdint.h',
         'include/ports/SkTypeface_win.h',
     ]
     CPP_SOURCES += [
         'SkFontHost_win.cpp',
         'SkFontHost_tables.cpp',
         'SkFontHost_sandbox_none.cpp',
+        'SkThread_win.cpp',
         'SkTime_win.cpp',
     ]
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2':
     CPP_SOURCES += [
         'SkFontHost_FreeType.cpp',
         'SkFontHost_FreeType_common.cpp',
         'SkFontHost_linux.cpp',
         'SkFontHost_tables.cpp',
+        'SkThread_pthread.cpp',
         'SkTime_Unix.cpp',
         'SkMMapStream.cpp',
         'SkOSFile.cpp',
     ]
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
     CPP_SOURCES += [
         'SkFontHost_FreeType.cpp',
         'SkFontHost_FreeType_common.cpp',
         'SkFontHost_tables.cpp',
         'SkMMapStream.cpp',
         'SkOSFile.cpp',
     ]
     if CONFIG['OS_TARGET'] == 'Linux':
         CPP_SOURCES += [
             'SkFontHost_linux.cpp',
             'SkFontHost_tables.cpp',
+            'SkThread_pthread.cpp',
             'SkTime_Unix.cpp',
         ]
+elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+    CPP_SOURCES += [
+        'SkThread_pthread.cpp',
+    ]
 
 
 # Separate 'if' from above, since the else below applies to all != 'android'
 # toolkits.
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
     CPP_SOURCES += [
         'SkDebug_android.cpp',
         'SkFontHost_android_old.cpp',
@@ -204,17 +212,16 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr
         'SkFontHost_tables.cpp',
         'SkMMapStream.cpp',
         'SkTime_Unix.cpp',
         'SkThread_pthread.cpp',
     ]
 else:
     CPP_SOURCES += [
         'SkDebug_stdio.cpp',
-        'SkThread_none.cpp',
     ]
 
 if CONFIG['INTEL_ARCHITECTURE']:
     CPP_SOURCES += [
         'SkBitmapProcState_opts_SSE2.cpp',
         'SkBlitRect_opts_SSE2.cpp',
         'SkBlitRow_opts_SSE2.cpp',
         'SkUtils_opts_SSE2.cpp',