Merge backout

This commit is contained in:
Ehsan Akhgari 2011-08-19 14:22:59 -04:00
commit 03147018ec
6 changed files with 49 additions and 19 deletions

View File

@ -203,6 +203,21 @@ codesighs:
# defined in package-name.mk
export MOZ_SOURCE_STAMP
#XXX: this is a hack, since we don't want to clobber for MSVC
# PGO support, but we can't do this test in client.mk
ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_)
# No point in clobbering if PGO has been explicitly disabled.
ifndef NO_PROFILE_GUIDED_OPTIMIZE
maybe_clobber_profiledbuild: clean
else
maybe_clobber_profiledbuild:
endif
else
maybe_clobber_profiledbuild:
endif
.PHONY: maybe_clobber_profiledbuild
# Look for R_386_PC32 relocations in shared libs, these
# break x86_64 builds and SELinux users.
ifeq ($(OS_TARGET)_$(TARGET_XPCOM_ABI),Linux_x86-gcc3)

View File

@ -212,6 +212,7 @@ profiledbuild::
$(MAKE) -f $(TOPSRCDIR)/client.mk realbuild MOZ_PROFILE_GENERATE=1
$(MAKE) -C $(PGO_OBJDIR) package
OBJDIR=${PGO_OBJDIR} JARLOG_DIR=${PGO_OBJDIR}/jarlog/en-US $(PROFILE_GEN_SCRIPT)
$(MAKE) -f $(TOPSRCDIR)/client.mk maybe_clobber_profiledbuild
$(MAKE) -f $(TOPSRCDIR)/client.mk realbuild MOZ_PROFILE_USE=1
#####################################################
@ -253,7 +254,7 @@ endif
# loop through them.
ifeq (,$(MOZ_CURRENT_PROJECT)$(if $(MOZ_BUILD_PROJECTS),,1))
configure depend realbuild install export libs clean realclean distclean alldep preflight postflight upload sdk::
configure depend realbuild install export libs clean realclean distclean alldep preflight postflight maybe_clobber_profiledbuild upload sdk::
set -e; \
for app in $(MOZ_BUILD_PROJECTS); do \
$(MAKE) -f $(TOPSRCDIR)/client.mk $@ MOZ_CURRENT_PROJECT=$$app; \
@ -353,7 +354,7 @@ realbuild:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
# Other targets
# Pass these target onto the real build system
install export libs clean realclean distclean alldep upload sdk:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
install export libs clean realclean distclean alldep maybe_clobber_profiledbuild upload sdk:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
$(MOZ_MAKE) $@
####################################
@ -412,4 +413,4 @@ echo-variable-%:
# in parallel.
.NOTPARALLEL:
.PHONY: checkout real_checkout depend realbuild build profiledbuild export libs alldep install clean realclean distclean cleansrcdir pull_all build_all clobber clobber_all pull_and_build_all everything configure preflight_all preflight postflight postflight_all upload sdk
.PHONY: checkout real_checkout depend realbuild build profiledbuild maybe_clobber_profiledbuild export libs alldep install clean realclean distclean cleansrcdir pull_all build_all clobber clobber_all pull_and_build_all everything configure preflight_all preflight postflight postflight_all upload sdk

View File

@ -898,9 +898,6 @@ ifdef SHARED_LIBRARY
$(SHARED_LIBRARY_NAME) $(DIST)/$(MOZ_APP_NAME)
endif
endif # SHARED_LIBRARY || PROGRAM
else # ! WINNT_
# Force rebuilding all objects on the second pass
$(OBJS): FORCE
endif # WINNT_
endif # MOZ_PROFILE_USE
ifdef MOZ_PROFILE_GENERATE

View File

@ -898,9 +898,6 @@ ifdef SHARED_LIBRARY
$(SHARED_LIBRARY_NAME) $(DIST)/$(MOZ_APP_NAME)
endif
endif # SHARED_LIBRARY || PROGRAM
else # ! WINNT_
# Force rebuilding all objects on the second pass
$(OBJS): FORCE
endif # WINNT_
endif # MOZ_PROFILE_USE
ifdef MOZ_PROFILE_GENERATE

View File

@ -114,6 +114,9 @@ static void glxtest()
typedef GLXFBConfig* (* PFNGLXQUERYEXTENSION) (Display *, int *, int *);
PFNGLXQUERYEXTENSION glXQueryExtension = cast<PFNGLXQUERYEXTENSION>(dlsym(libgl, "glXQueryExtension"));
typedef GLXFBConfig* (* PFNGLXQUERYVERSION) (Display *, int *, int *);
PFNGLXQUERYVERSION glXQueryVersion = cast<PFNGLXQUERYVERSION>(dlsym(libgl, "glXQueryVersion"));
typedef GLXFBConfig* (* PFNGLXCHOOSEFBCONFIG) (Display *, int, const int *, int *);
PFNGLXCHOOSEFBCONFIG glXChooseFBConfig = cast<PFNGLXCHOOSEFBCONFIG>(dlsym(libgl, "glXChooseFBConfig"));
@ -142,6 +145,7 @@ static void glxtest()
PFNGLXGETPROCADDRESS glXGetProcAddress = cast<PFNGLXGETPROCADDRESS>(dlsym(libgl, "glXGetProcAddress"));
if (!glXQueryExtension ||
!glXQueryVersion ||
!glXChooseFBConfig ||
!glXGetVisualFromFBConfig ||
!glXCreatePixmap ||
@ -162,6 +166,14 @@ static void glxtest()
///// Check that the GLX extension is present /////
if (!glXQueryExtension(dpy, NULL, NULL))
fatal_error("GLX extension missing");
///// Check that the GLX version is >= 1.3, needed for glXCreatePixmap, bug 659932 /////
int majorVersion, minorVersion;
if (!glXQueryVersion(dpy, &majorVersion, &minorVersion))
fatal_error("Unable to query GLX version");
if (majorVersion < 1 || (majorVersion == 1 && minorVersion < 3))
fatal_error("GLX version older than the required 1.3");
XSetErrorHandler(x_error_handler);

View File

@ -828,21 +828,29 @@ nsBaseWidget::GetShouldAccelerate()
if (xr)
xr->GetInSafeMode(&safeMode);
bool whitelisted = false;
// bug 655578: on X11 at least, we must always call GetFeatureStatus (even if we don't need that information)
// as that's what causes GfxInfo initialization which kills the zombie 'glxtest' process.
nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
if (gfxInfo) {
PRInt32 status;
if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_OPENGL_LAYERS, &status))) {
if (status == nsIGfxInfo::FEATURE_NO_INFO) {
whitelisted = true;
}
}
}
if (disableAcceleration || safeMode)
return PR_FALSE;
if (forceAcceleration)
return PR_TRUE;
nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
if (gfxInfo) {
PRInt32 status;
if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_OPENGL_LAYERS, &status))) {
if (status != nsIGfxInfo::FEATURE_NO_INFO) {
NS_WARNING("OpenGL-accelerated layers are not supported on this system.");
return PR_FALSE;
}
}
if (!whitelisted) {
NS_WARNING("OpenGL-accelerated layers are not supported on this system.");
return PR_FALSE;
}
if (accelerateByDefault)