Bug 1722653 - Remove --enable-system-cairo. r=firefox-build-system-reviewers,jrmuizel,andi

It hasn't been supported since bug 1432751, > 3 years ago.

Differential Revision: https://phabricator.services.mozilla.com/D121063
This commit is contained in:
Mike Hommey 2021-07-29 23:38:30 +00:00
parent 3282e2080d
commit 25c71f548b
10 changed files with 17 additions and 51 deletions

View File

@ -74,7 +74,6 @@ def prepare_configure(mozconfig, old_configure_assignments):
def old_configure_options(*options):
for opt in options:
if opt in (
"--enable-system-cairo",
"--enable-system-png",
"--with-system-libevent",
"--with-system-png",
@ -108,7 +107,6 @@ def old_configure_options(*options):
"--enable-official-branding",
"--enable-parental-controls",
"--enable-sandbox",
"--enable-system-cairo",
"--enable-system-extension-dirs",
"--enable-system-pixman",
"--enable-universalchardet",

View File

@ -1295,12 +1295,10 @@ void DrawTargetCairo::SetFontOptions(cairo_antialias_t aAAMode) {
void DrawTargetCairo::SetPermitSubpixelAA(bool aPermitSubpixelAA) {
DrawTarget::SetPermitSubpixelAA(aPermitSubpixelAA);
#ifdef MOZ_TREE_CAIRO
cairo_surface_set_subpixel_antialiasing(
cairo_get_group_target(mContext),
aPermitSubpixelAA ? CAIRO_SUBPIXEL_ANTIALIASING_ENABLED
: CAIRO_SUBPIXEL_ANTIALIASING_DISABLED);
#endif
}
static bool SupportsVariationSettings(cairo_surface_t* surface) {

View File

@ -228,9 +228,8 @@ DEFINES['PACKAGE_BUGREPORT'] = '"http://bugzilla.mozilla.org/"'
for var in ('CAIRO_HAS_PTHREAD', '_GNU_SOURCE'):
DEFINES[var] = True
for var in ('MOZ_TREE_CAIRO', 'MOZ_TREE_PIXMAN'):
if CONFIG[var]:
DEFINES[var] = True
if CONFIG['MOZ_TREE_PIXMAN']:
DEFINES['MOZ_TREE_PIXMAN'] = True
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
DEFINES['HAVE_CXX11_ATOMIC_PRIMITIVES'] = True

View File

@ -10,10 +10,8 @@ with Files("**"):
with Files("wr/**"):
BUG_COMPONENT = ("Core", "Graphics: WebRender")
if CONFIG["MOZ_TREE_CAIRO"]:
DIRS += ["cairo"]
DIRS += [
"cairo",
"2d",
"ycbcr",
"angle",

View File

@ -47,13 +47,11 @@ PrintTarget::PrintTarget(cairo_surface_t* aCairoSurface, const IntSize& aSize)
// so we don't call cairo_surface_reference(aSurface) here.
// This code was copied from gfxASurface::Init:
#ifdef MOZ_TREE_CAIRO
if (mCairoSurface &&
cairo_surface_get_content(mCairoSurface) != CAIRO_CONTENT_COLOR) {
cairo_surface_set_subpixel_antialiasing(
mCairoSurface, CAIRO_SUBPIXEL_ANTIALIASING_DISABLED);
}
#endif
}
PrintTarget::~PrintTarget() {

View File

@ -183,12 +183,10 @@ void gfxASurface::Init(cairo_surface_t* surface, bool existingSurface) {
mFloatingRefs = 0;
} else {
mFloatingRefs = 1;
#ifdef MOZ_TREE_CAIRO
if (cairo_surface_get_content(surface) != CAIRO_CONTENT_COLOR) {
cairo_surface_set_subpixel_antialiasing(
surface, CAIRO_SUBPIXEL_ANTIALIASING_DISABLED);
}
#endif
}
}

View File

@ -2600,28 +2600,26 @@ void gfxFcPlatformFontList::ActivateBundledFonts() {
/***************************************************************************
*
* These functions must be last in the file because it uses the system cairo
* library. Above this point the cairo library used is the tree cairo if
* MOZ_TREE_CAIRO.
* library. Above this point the cairo library used is the tree cairo.
*/
# if MOZ_TREE_CAIRO
// Tree cairo symbols have different names. Disable their activation through
// preprocessor macros.
# undef cairo_ft_font_options_substitute
# undef cairo_ft_font_options_substitute
# undef cairo_font_options_create
# undef cairo_font_options_destroy
# undef cairo_font_options_copy
# undef cairo_font_options_equal
# undef cairo_font_options_create
# undef cairo_font_options_destroy
# undef cairo_font_options_copy
# undef cairo_font_options_equal
# undef cairo_font_options_get_antialias
# undef cairo_font_options_set_antialias
# undef cairo_font_options_get_hint_style
# undef cairo_font_options_set_hint_style
# undef cairo_font_options_get_lcd_filter
# undef cairo_font_options_set_lcd_filter
# undef cairo_font_options_get_subpixel_order
# undef cairo_font_options_set_subpixel_order
# undef cairo_font_options_get_antialias
# undef cairo_font_options_set_antialias
# undef cairo_font_options_get_hint_style
# undef cairo_font_options_set_hint_style
# undef cairo_font_options_get_lcd_filter
# undef cairo_font_options_set_lcd_filter
# undef cairo_font_options_get_subpixel_order
# undef cairo_font_options_set_subpixel_order
// The system cairo functions are not declared because the include paths cause
// the gdk headers to pick up the tree cairo.h.
@ -2649,7 +2647,6 @@ cairo_font_options_get_subpixel_order(const cairo_font_options_t*);
NS_VISIBILITY_DEFAULT void cairo_font_options_set_subpixel_order(
cairo_font_options_t*, cairo_subpixel_order_t);
}
# endif
void gfxFcPlatformFontList::ClearSystemFontOptions() {
if (mSystemFontOptions) {

View File

@ -1387,9 +1387,7 @@ void gfxPlatform::WillShutdown() {
// because cairo can assert and thus crash on shutdown, don't do this in
// release builds
#ifdef NS_FREE_PERMANENT_DATA
# if MOZ_TREE_CAIRO
cairo_debug_reset_static_data();
# endif
#endif
}

View File

@ -2301,12 +2301,6 @@ dnl ========================================================
dnl Check for pixman and cairo
dnl ========================================================
MOZ_TREE_CAIRO=1
MOZ_ARG_ENABLE_BOOL(system-cairo,
[ --enable-system-cairo Obsolete: do not use this option],
AC_MSG_ERROR(--enable-system-cairo is not supported),
MOZ_TREE_CAIRO=1 )
MOZ_TREE_PIXMAN=1
MOZ_ARG_ENABLE_BOOL(system-pixman,
[ --enable-system-pixman Use system pixman (located with pkgconfig)],
@ -2321,7 +2315,6 @@ else
fi
MOZ_CAIRO_CFLAGS="-I${DIST}/include/cairo"
AC_DEFINE(MOZ_TREE_CAIRO)
if test "$OS_ARCH" = "WINNT"; then
# For now we assume that we will have a uint64_t available through
@ -2395,7 +2388,6 @@ android)
;;
esac
AC_SUBST(MOZ_TREE_CAIRO)
AC_SUBST_LIST(MOZ_CAIRO_CFLAGS)
AC_SUBST_LIST(MOZ_CAIRO_LIBS)
AC_SUBST_LIST(MOZ_CAIRO_OSLIBS)

View File

@ -155,16 +155,6 @@ DEFINES["CAIRO_GFX"] = True
DEFINES["MOZ_APP_NAME"] = '"%s"' % CONFIG["MOZ_APP_NAME"]
# When building with GTK3, the widget code always needs to use
# system Cairo headers, regardless of whether we are also linked
# against and using in-tree Cairo. By not using in-tree Cairo
# headers, we avoid picking up our renamed symbols, and instead
# use only system Cairo symbols that GTK3 uses. This allows that
# any Cairo objects created can be freely passed back and forth
# between the widget code and GTK3.
if not (CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk" and CONFIG["MOZ_TREE_CAIRO"]):
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
CFLAGS += CONFIG["TK_CFLAGS"]
CXXFLAGS += CONFIG["TK_CFLAGS"]