Bug 1722653 - Remove MOZ_CAIRO_CFLAGS. r=firefox-build-system-reviewers,jgilbert,andi

Differential Revision: https://phabricator.services.mozilla.com/D121066
This commit is contained in:
Mike Hommey 2021-07-29 23:38:31 +00:00
parent 0fefbe85ee
commit 03223f9ea4
23 changed files with 34 additions and 59 deletions

View File

@ -90,8 +90,8 @@ LOCAL_INCLUDES += [
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
LOCAL_INCLUDES += [
"/accessible/atk",
"/gfx/cairo/cairo/src",
]
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
LOCAL_INCLUDES += [
"/accessible/windows/ia2",

View File

@ -203,6 +203,7 @@ LOCAL_INCLUDES += [
"/dom/workers",
"/dom/xul",
"/gfx/angle/checkout/include",
"/gfx/cairo/cairo/src",
"/gfx/gl",
"/image",
"/js/xpconnect/src",
@ -212,7 +213,6 @@ LOCAL_INCLUDES += [
"/media/libyuv/libyuv/include",
]
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
CXXFLAGS += CONFIG["TK_CFLAGS"]
LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]

View File

@ -33,6 +33,7 @@ SOURCES += [
]
LOCAL_INCLUDES += [
"/gfx/cairo/cairo/src",
"/media/libyuv/libyuv/include",
]
@ -40,7 +41,5 @@ include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = "xul"
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
# Add libFuzzer configuration directives
include("/tools/fuzzing/libfuzzer-config.mozbuild")

View File

@ -23,6 +23,7 @@ UNIFIED_SOURCES += [
LOCAL_INCLUDES += [
"/dom/base",
"/gfx/cairo/cairo/src",
"/layout/generic",
"/layout/xul",
"/netwerk/base",
@ -40,7 +41,6 @@ include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = "xul"
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
CXXFLAGS += CONFIG["TK_CFLAGS"]
if CONFIG["CC_TYPE"] in ("clang", "gcc"):

View File

@ -237,10 +237,12 @@ for var in ("USE_CAIRO", "MOZ2D_HAS_MOZ_CAIRO"):
if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("android", "gtk"):
DEFINES["MOZ_ENABLE_FREETYPE"] = True
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
CXXFLAGS += ["-Werror=switch"]
if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("android", "gtk"):
CXXFLAGS += CONFIG["CAIRO_FT_CFLAGS"]
LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
LOCAL_INCLUDES += [
"/gfx/cairo/cairo/src",
]

View File

@ -150,9 +150,7 @@ FINAL_LIBRARY = "xul"
if CONFIG["MOZ_D3DCOMPILER_VISTA_DLL"]:
DEFINES["MOZ_D3DCOMPILER_VISTA_DLL"] = CONFIG["MOZ_D3DCOMPILER_VISTA_DLL"]
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
CXXFLAGS += CONFIG["TK_CFLAGS"]
CFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
CFLAGS += CONFIG["TK_CFLAGS"]
CXXFLAGS += ["-Werror=switch"]
@ -162,6 +160,9 @@ if CONFIG["MOZ_WAYLAND"]:
CFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
LOCAL_INCLUDES += [
"/gfx/cairo/cairo/src",
]
if CONFIG["CC_TYPE"] in ("clang", "gcc"):
CXXFLAGS += ["-Wno-error=shadow"]

View File

@ -64,6 +64,7 @@ PREPROCESSED_IPDL_SOURCES += [
LOCAL_INCLUDES += [
"/dom/ipc",
"/gfx/cairo/cairo/src",
"/toolkit/crashreporter",
"/xpcom/threads",
]
@ -72,7 +73,6 @@ include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = "xul"
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
CXXFLAGS += CONFIG["TK_CFLAGS"]
CXXFLAGS += ["-Werror=switch"]

View File

@ -25,13 +25,12 @@ include("/ipc/chromium/chromium-config.mozbuild")
LOCAL_INCLUDES += [
"/gfx/2d",
"/gfx/cairo/cairo/src",
"/gfx/layers",
"/gfx/tests/gtest", # for TestLayers.h, which is shared with the gfx gtests
]
FINAL_LIBRARY = "xul-gtest"
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
if CONFIG["CC_TYPE"] in ("clang", "gcc"):
CXXFLAGS += ["-Wno-error=shadow"]

View File

@ -596,6 +596,7 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
LOCAL_INCLUDES += [
"/docshell/base", # for nsDocShell.h
"/dom/canvas", # for intertwined WebGL headers
"/gfx/cairo/cairo/src",
"/layout/base", # for TouchManager.h
"/layout/generic", # for nsTextFrame.h
"/media/libyuv/libyuv/include", # for libyuv.h
@ -616,7 +617,6 @@ if CONFIG["ENABLE_TESTS"]:
MOCHITEST_MANIFESTS += ["apz/test/mochitest/mochitest.ini"]
BROWSER_CHROME_MANIFESTS += ["apz/test/mochitest/browser.ini"]
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
CXXFLAGS += CONFIG["TK_CFLAGS"]
CXXFLAGS += ["-Werror=switch"]

View File

@ -98,7 +98,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'):
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
LOCAL_INCLUDES += [
"/gfx/cairo/cairo/src",
]
CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':

View File

@ -490,7 +490,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'):
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
LOCAL_INCLUDES += [
"/gfx/cairo/cairo/src",
]
CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':

View File

@ -3,29 +3,6 @@ Date: Wed, 1 Aug 2012 16:43:15 -0400
Subject: Bug 736276 - Add a new SkFontHost that takes a cairo_scaled_font_t r=karl
diff --git a/gfx/skia/Makefile.in b/gfx/skia/Makefile.in
index 5ebbd2e..7c8cdbf 100644
--- a/gfx/skia/Makefile.in
+++ b/gfx/skia/Makefile.in
@@ -60,15 +60,15 @@ VPATH += \
$(NULL)
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
-OS_CXXFLAGS += $(CAIRO_FT_CFLAGS)
+OS_CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(CAIRO_FT_CFLAGS)
endif
ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT))
-OS_CXXFLAGS += $(MOZ_PANGO_CFLAGS)
+OS_CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(MOZ_PANGO_CFLAGS) $(CAIRO_FT_CFLAGS)
endif
ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
-OS_CXXFLAGS += $(MOZ_PANGO_CFLAGS)
+OS_CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(MOZ_PANGO_CFLAGS) $(CAIRO_FT_CFLAGS)
ifeq (Linux,$(OS_TARGET))
DEFINES += -DSK_USE_POSIX_THREADS=1
endif
diff --git a/gfx/skia/include/ports/SkTypeface_cairo.h b/gfx/skia/include/ports/SkTypeface_cairo.h
new file mode 100644
index 0000000..7e44f04

View File

@ -86,11 +86,11 @@ include("/ipc/chromium/chromium-config.mozbuild")
LOCAL_INCLUDES += [
"/dom/ipc", # for ContentChild.h
"/gfx/cairo/cairo/src",
]
FINAL_LIBRARY = "xul"
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
CXXFLAGS += CONFIG["TK_CFLAGS"]
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":

View File

@ -77,6 +77,7 @@ include("/ipc/chromium/chromium-config.mozbuild")
LOCAL_INCLUDES += [
"/gfx/2d",
"/gfx/2d/unittest",
"/gfx/cairo/cairo/src",
"/gfx/config",
"/gfx/layers",
"/gfx/ots/src",
@ -85,7 +86,5 @@ LOCAL_INCLUDES += [
FINAL_LIBRARY = "xul-gtest"
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
if CONFIG["CC_TYPE"] in ("clang", "gcc"):
CXXFLAGS += ["-Wno-error=shadow"]

View File

@ -263,6 +263,7 @@ LOCAL_INCLUDES += [
"/dom/base",
"/dom/media/platforms/apple",
"/dom/xml",
"/gfx/cairo/cairo/src",
]
if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("android", "gtk"):
@ -273,9 +274,7 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
if CONFIG[var]:
DEFINES[var] = True
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
CXXFLAGS += CONFIG["TK_CFLAGS"]
CFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
CFLAGS += CONFIG["TK_CFLAGS"]
if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("android"):

View File

@ -32,6 +32,7 @@ EXPORTS += [
LOCAL_INCLUDES += [
"/dom/base",
"/dom/canvas",
"/gfx/cairo/cairo/src",
"/gfx/layers/d3d11",
"/gfx/thebes",
]
@ -90,9 +91,7 @@ if CONFIG["OS_ARCH"] == "WINNT":
LOCAL_INCLUDES += ["/layout/generic", "/widget", "/widget/windows"]
SOURCES += ["FxROutputHandler.cpp", "FxRWindowManager.cpp"]
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
CXXFLAGS += CONFIG["TK_CFLAGS"]
CFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
CFLAGS += CONFIG["TK_CFLAGS"]
include("/ipc/chromium/chromium-config.mozbuild")

View File

@ -99,7 +99,6 @@ if CONFIG["MOZ_WAYLAND"]:
]
if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("android", "gtk"):
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
CXXFLAGS += CONFIG["CAIRO_FT_CFLAGS"]
if CONFIG["COMPILE_ENVIRONMENT"]:
@ -121,6 +120,8 @@ include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = "xul"
LOCAL_INCLUDES += [
"/gfx/cairo/cairo/src",
]
CXXFLAGS += CONFIG["TK_CFLAGS"]
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
CXXFLAGS += ["-Werror=switch"]

View File

@ -121,6 +121,8 @@ LOCAL_INCLUDES += [
# Because SVGDocumentWrapper.cpp includes "mozilla/dom/SVGSVGElement.h"
"/dom/base",
"/dom/svg",
# Because imgFrame.cpp includes "cairo.h"
"/gfx/cairo/cairo/src",
# We need to instantiate the decoders
"/image/decoders",
# For URI-related functionality
@ -131,9 +133,6 @@ LOCAL_INCLUDES += [
"/xpcom/threads",
]
# Because imgFrame.cpp includes "cairo.h"
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
if CONFIG["CC_TYPE"] in ("clang", "gcc"):

View File

@ -253,6 +253,7 @@ LOCAL_INCLUDES += [
"/dom/base",
"/dom/html",
"/dom/xul",
"/gfx/cairo/cairo/src",
]
JAR_MANIFESTS += ["jar.mn"]
@ -264,8 +265,6 @@ CONTENT_ACCESSIBLE_FILES.html = [
MOCHITEST_MANIFESTS += ["test/mochitest.ini"]
MOCHITEST_CHROME_MANIFESTS += ["test/chrome.ini"]
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
CXXFLAGS += CONFIG["TK_CFLAGS"]

View File

@ -61,6 +61,7 @@ LOCAL_INCLUDES += [
"/docshell/base",
"/dom/base",
"/gfx/2d",
"/gfx/cairo/cairo/src",
"/layout/base",
"/layout/generic",
"/layout/style",
@ -72,7 +73,5 @@ LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
FINAL_LIBRARY = "xul"
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
if CONFIG["CC_TYPE"] in ("clang", "gcc"):
CXXFLAGS += ["-Wno-error=shadow"]

View File

@ -2313,8 +2313,6 @@ else
PKG_CHECK_MODULES(MOZ_PIXMAN, pixman-1 >= 0.19.2)
fi
MOZ_CAIRO_CFLAGS="-I${DIST}/include/cairo"
if test "$OS_ARCH" = "WINNT"; then
# For now we assume that we will have a uint64_t available through
# one of the above headers or mozstdint.h.
@ -2340,7 +2338,6 @@ if test "$MOZ_X11"; then
MOZ_CAIRO_OSLIBS="$MOZ_CAIRO_OSLIBS $XLDFLAGS -lXrender"
fi
AC_SUBST_LIST(MOZ_CAIRO_CFLAGS)
AC_SUBST_LIST(MOZ_CAIRO_LIBS)
AC_SUBST_LIST(MOZ_CAIRO_OSLIBS)
AC_SUBST(MOZ_TREE_PIXMAN)

View File

@ -21,4 +21,6 @@ include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = "xul"
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
LOCAL_INCLUDES += [
"/gfx/cairo/cairo/src",
]

View File

@ -163,6 +163,7 @@ if CONFIG["MOZ_ENABLE_SKIA_PDF"]:
LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
LOCAL_INCLUDES += [
"/gfx/cairo/cairo/src",
"/layout/forms",
"/layout/generic",
"/layout/style",
@ -179,8 +180,6 @@ for var in "MOZ_ENABLE_D3D10_LAYER":
if CONFIG[var]:
DEFINES[var] = True
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
OS_LIBS += [
"rpcrt4",
"urlmon",