diff options
author | Moonchild <moonchild@palemoon.org> | 2021-01-02 13:35:39 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-01-02 13:35:39 +0000 |
commit | babeb5c556de6f9686f5cd47133d0c40c07bfc2e (patch) | |
tree | 146dd48634e5d44746acdd49dc142e413349054d /gfx | |
parent | 0bb464bfc13e3a0239fd268de265fc332014b385 (diff) | |
download | UXP-babeb5c556de6f9686f5cd47133d0c40c07bfc2e.tar UXP-babeb5c556de6f9686f5cd47133d0c40c07bfc2e.tar.gz UXP-babeb5c556de6f9686f5cd47133d0c40c07bfc2e.tar.lz UXP-babeb5c556de6f9686f5cd47133d0c40c07bfc2e.tar.xz UXP-babeb5c556de6f9686f5cd47133d0c40c07bfc2e.zip |
Issue #61 - Reinstate buildability with shared gkmedias dll
This fully works for splitting gkmedias.dll back out from xul with one exception
which is Skia throwing undefined externals when linking gkmedias.
Diffstat (limited to 'gfx')
-rwxr-xr-x | gfx/angle/moz.build | 8 | ||||
-rw-r--r-- | gfx/graphite2/src/moz.build | 10 | ||||
-rw-r--r-- | gfx/ots/src/moz.build | 7 | ||||
-rw-r--r-- | gfx/qcms/moz.build | 5 | ||||
-rwxr-xr-x | gfx/skia/generate_mozbuild.py | 4 | ||||
-rw-r--r-- | gfx/skia/moz.build | 6 | ||||
-rw-r--r-- | gfx/skia/skia/include/utils/SkPaintFilterCanvas.h | 2 | ||||
-rw-r--r-- | gfx/skia/skia/src/core/SkCanvas.cpp | 4 | ||||
-rw-r--r-- | gfx/skia/skia/src/ports/SkTypeface_win_dw.cpp | 2 | ||||
-rw-r--r-- | gfx/thebes/moz.build | 3 |
10 files changed, 43 insertions, 8 deletions
diff --git a/gfx/angle/moz.build b/gfx/angle/moz.build index 1dbfaf2ce..f12eb6ca5 100755 --- a/gfx/angle/moz.build +++ b/gfx/angle/moz.build @@ -172,6 +172,14 @@ EXPORTS.angle.KHR += [ 'include/KHR/khrplatform.h' ] LOCAL_INCLUDES += [ 'include', 'src', 'src/common/third_party/numerics' ] +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + +# This tells ANGLE to build the translator with declspec(dllexport) on Windows +# which we need to get these symbols exported from gkmedias +DEFINES['COMPONENT_BUILD'] = True +DEFINES['ANGLE_TRANSLATOR_IMPLEMENTATION'] = True + # We allow warnings for third-party code that can be updated from upstream. ALLOW_COMPILER_WARNINGS = True diff --git a/gfx/graphite2/src/moz.build b/gfx/graphite2/src/moz.build index 09ebc0ce6..ecf396e2b 100644 --- a/gfx/graphite2/src/moz.build +++ b/gfx/graphite2/src/moz.build @@ -57,9 +57,13 @@ SOURCES += [ 'UtfCodec.cpp', ] -# tell graphite2 not to export symbols, we'll be linking it directly with -# thebes -DEFINES['GRAPHITE2_STATIC'] = True +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + DEFINES['GRAPHITE2_EXPORTING'] = True +else: + # tell graphite2 not to export symbols, we'll be linking it directly with + # thebes + DEFINES['GRAPHITE2_STATIC'] = True # We allow warnings for third-party code that can be updated from upstream. ALLOW_COMPILER_WARNINGS = True diff --git a/gfx/ots/src/moz.build b/gfx/ots/src/moz.build index 150773db9..909a2092e 100644 --- a/gfx/ots/src/moz.build +++ b/gfx/ots/src/moz.build @@ -56,6 +56,9 @@ SOURCES += [ 'vvar.cc', ] +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + # We allow warnings for third-party code that can be updated from upstream. ALLOW_COMPILER_WARNINGS = True @@ -66,6 +69,10 @@ DEFINES['PACKAGE_BUGREPORT'] = '"http://bugzilla.mozilla.org/"' DEFINES['OTS_GRAPHITE'] = 1 DEFINES['OTS_VARIATIONS'] = 1 +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + DEFINES['OTS_DLL'] = True + DEFINES['OTS_DLL_EXPORTS'] = True + USE_LIBS += [ 'brotli', 'woff2', diff --git a/gfx/qcms/moz.build b/gfx/qcms/moz.build index 405743606..9bcbbe63a 100644 --- a/gfx/qcms/moz.build +++ b/gfx/qcms/moz.build @@ -16,7 +16,10 @@ SOURCES += [ 'transform_util.c', ] -FINAL_LIBRARY = 'xul' +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + +FINAL_LIBRARY = 'gkmedias' if CONFIG['GNU_CC']: CFLAGS += ['-Wno-missing-field-initializers'] diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py index 08d6ed9ab..de0a5c52e 100755 --- a/gfx/skia/generate_mozbuild.py +++ b/gfx/skia/generate_mozbuild.py @@ -84,6 +84,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': 'skia/src/fonts/SkRemotableFontMgr.cpp', ] +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + DEFINES['SKIA_DLL'] = 1 + DEFINES['GR_DLL'] = 1 + # We should autogenerate these SSE related flags. if CONFIG['_MSC_VER']: diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build index 56570e61f..4ef5060b0 100644 --- a/gfx/skia/moz.build +++ b/gfx/skia/moz.build @@ -643,7 +643,6 @@ else: 'skia/src/opts/SkBlitRow_opts_none.cpp', ] - # We allow warnings for third-party code that can be updated from upstream. ALLOW_COMPILER_WARNINGS = True @@ -694,6 +693,11 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': 'skia/src/fonts/SkRemotableFontMgr.cpp', ] +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + DEFINES['SKIA_DLL'] = 1 + DEFINES['GR_DLL'] = 1 + DEFINES['SK_FONT_HOST_USE_SYSTEM_SETTINGS'] = 1 + # We should autogenerate these SSE related flags. if CONFIG['_MSC_VER']: diff --git a/gfx/skia/skia/include/utils/SkPaintFilterCanvas.h b/gfx/skia/skia/include/utils/SkPaintFilterCanvas.h index 63eaaa2fb..29474df0f 100644 --- a/gfx/skia/skia/include/utils/SkPaintFilterCanvas.h +++ b/gfx/skia/skia/include/utils/SkPaintFilterCanvas.h @@ -27,7 +27,7 @@ public: * specified canvas. Also copies the target canvas matrix and clip bounds. */ SkPaintFilterCanvas(SkCanvas* canvas); - + enum Type { kPaint_Type, kPoint_Type, diff --git a/gfx/skia/skia/src/core/SkCanvas.cpp b/gfx/skia/skia/src/core/SkCanvas.cpp index 505592d0f..0a080f737 100644 --- a/gfx/skia/skia/src/core/SkCanvas.cpp +++ b/gfx/skia/skia/src/core/SkCanvas.cpp @@ -22,6 +22,7 @@ #include "SkLatticeIter.h" #include "SkMatrixUtils.h" #include "SkMetaData.h" +#include "SkNWayCanvas.h" #include "SkNx.h" #include "SkPaintPriv.h" #include "SkPatchUtils.h" @@ -45,9 +46,10 @@ #include "GrContext.h" #include "GrRenderTarget.h" #include "SkGrPriv.h" - #endif +class SkNWayCanvas; + #define RETURN_ON_NULL(ptr) do { if (nullptr == (ptr)) return; } while (0) /* diff --git a/gfx/skia/skia/src/ports/SkTypeface_win_dw.cpp b/gfx/skia/skia/src/ports/SkTypeface_win_dw.cpp index 96a728f60..ca5f01aed 100644 --- a/gfx/skia/skia/src/ports/SkTypeface_win_dw.cpp +++ b/gfx/skia/skia/src/ports/SkTypeface_win_dw.cpp @@ -251,7 +251,7 @@ SkScalerContext* DWriteFontTypeface::onCreateScalerContext(const SkScalerContext } #ifdef MOZ_SKIA -IDWriteRenderingParams* GetDwriteRenderingParams(bool aGDI); +extern IDWriteRenderingParams* GetDwriteRenderingParams(bool aGDI); #endif void DWriteFontTypeface::onFilterRec(SkScalerContext::Rec* rec) const { diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build index a725ab024..b84c4a4c6 100644 --- a/gfx/thebes/moz.build +++ b/gfx/thebes/moz.build @@ -255,6 +255,9 @@ LOCAL_INCLUDES += ['/media/libyuv/include'] DEFINES['GRAPHITE2_STATIC'] = True +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + DEFINES['OTS_DLL'] = True + if CONFIG['CLANG_CXX']: # Suppress warnings from Skia header files. SOURCES['gfxPlatform.cpp'].flags += ['-Wno-implicit-fallthrough'] |