Skip to content

Commit

Permalink
Bug 1722653 - Remove --enable-system-cairo. r=firefox-build-system-re…
Browse files Browse the repository at this point in the history
…viewers,jrmuizel,andi

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

Differential Revision: https://phabricator.services.mozilla.com/D121063
  • Loading branch information
glandium committed Jul 29, 2021
1 parent 3282e20 commit 25c71f5
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 53 deletions.
2 changes: 0 additions & 2 deletions build/moz.configure/old.configure
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions gfx/2d/DrawTargetCairo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 2 additions & 3 deletions gfx/cairo/cairo/src/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions gfx/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions gfx/thebes/PrintTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 0 additions & 2 deletions gfx/thebes/gfxASurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
35 changes: 16 additions & 19 deletions gfx/thebes/gfxFcPlatformFontList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_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_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_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.
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 0 additions & 2 deletions gfx/thebes/gfxPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
8 changes: 0 additions & 8 deletions old-configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)],
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down
10 changes: 0 additions & 10 deletions widget/gtk/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down

0 comments on commit 25c71f5

Please sign in to comment.