This commit is contained in:
Daniel Veditz 2010-03-08 01:59:52 -08:00
commit e52b96f8e3
13 changed files with 140 additions and 120 deletions

View File

@ -117,7 +117,7 @@ check::
echo "TEST-UNEXPECTED-FAIL | build/ | unify failed to produce a universal binary!"; \
false; \
fi
@if ! test -f ./unify-test-universal; then \
@if test ! -f ./unify-test-universal; then \
echo "TEST-UNEXPECTED-FAIL | build/ | unify failed to produce a universal binary!"; \
false; \
fi
@ -136,7 +136,7 @@ check::
echo "TEST-UNEXPECTED-FAIL | build/ | unify failed to unify a Java class file!"; \
false; \
fi
@if ! test -f ./unifytestc.class; then \
@if test ! -f ./unifytestc.class; then \
echo "TEST-UNEXPECTED-FAIL | build/ | unify failed to unify a Java class file!"; \
false; \
fi

View File

@ -1,5 +1,5 @@
$(shell \
if ! test -f include-dynamic.inc; then \
if test ! -f include-dynamic.inc; then \
echo "TESTVAR = oldval" > include-dynamic.inc; \
sleep 2; \
echo "TESTVAR = newval" > include-dynamic.inc.in; \

View File

@ -2640,7 +2640,7 @@ alpha*-*-osf*)
MOZ_FIX_LINK_PATHS=
AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
CFLAGS="$CFLAGS -xlibmieee -xstrconst -xbuiltin=%all"
CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife -norunpath"
CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic -norunpath"
LDFLAGS="-xildoff -z lazyload -z combreloc $LDFLAGS"
if test -z "$CROSS_COMPILE" && test -f /usr/lib/ld/map.noexstk; then
_SAVE_LDFLAGS=$LDFLAGS
@ -7390,13 +7390,8 @@ dnl Sun Studio on Solaris
if test "$SOLARIS_SUNPRO_CC"; then
PROFILE_GEN_CFLAGS="-xprofile=collect:$_objdir/$enable_application"
PROFILE_GEN_LDFLAGS="-xprofile=collect:$_objdir/$enable_application"
if test "$CPU_ARCH" != "sparc"; then
PROFILE_USE_CFLAGS="-xprofile=use:$_objdir/$enable_application"
PROFILE_USE_LDFLAGS="-xprofile=use:$_objdir/$enable_application"
else
PROFILE_USE_CFLAGS="-xlinkopt=2 -xprofile=use:$_objdir/$enable_application"
PROFILE_USE_LDFLAGS="-xlinkopt=2 -xprofile=use:$_objdir/$enable_application"
fi
PROFILE_USE_CFLAGS="-xprofile=use:$_objdir/$enable_application"
PROFILE_USE_LDFLAGS="-xprofile=use:$_objdir/$enable_application"
fi
AC_SUBST(PROFILE_GEN_CFLAGS)

View File

@ -381,7 +381,7 @@ nsFileDataProtocolHandler::NewURI(const nsACString& aSpec,
NS_ENSURE_SUCCESS(rv, rv);
nsRefPtr<nsFileDataURI> uri =
new nsFileDataURI(info ? info->mPrincipal : nsnull, inner);
new nsFileDataURI(info ? info->mPrincipal.get() : nsnull, inner);
NS_TryToSetImmutable(uri);
*aResult = uri.forget().get();

View File

@ -73,7 +73,7 @@ stage/javaconnect/.done:
javaconnect.js: stage/javaconnect/.done
@echo Creating $@...
rm -f javaconnect.js
@if ! test -e "javaconnect.jst"; then \
@if test ! -e "javaconnect.jst"; then \
$(INSTALL) -m 644 $(srcdir)/javaconnect.jst .; \
fi
$(PERL) $(topsrcdir)/toolkit/mozapps/installer/makejs.pl javaconnect.jst \

View File

@ -1541,7 +1541,9 @@ static void
_wrap_release_source_image (void *data)
{
struct acquire_source_image_data *acquire_data = data;
_cairo_surface_release_source_image (acquire_data->src, acquire_data->image, acquire_data->image_extra);
_cairo_surface_release_source_image (acquire_data->src,
acquire_data->image,
acquire_data->image_extra);
free(data);
}
@ -1555,37 +1557,43 @@ _wrap_image (cairo_surface_t *src,
cairo_image_surface_t *surface;
cairo_status_t status;
struct acquire_source_image_data *data = malloc(sizeof(*data));
struct acquire_source_image_data *data = malloc (sizeof (*data));
if (unlikely (data == NULL))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
data->src = src;
data->image = image;
data->image_extra = image_extra;
surface = (cairo_image_surface_t*)cairo_image_surface_create_for_data (image->data,
image->format,
image->width,
image->height,
image->stride);
surface = (cairo_image_surface_t*)
_cairo_image_surface_create_with_pixman_format (image->data,
image->pixman_format,
image->width,
image->height,
image->stride);
status = surface->base.status;
if (status)
return status;
status = _cairo_user_data_array_set_data (&surface->base.user_data,
&wrap_image_key,
data,
_wrap_release_source_image);
if (status) {
cairo_surface_destroy (&surface->base);
free (data);
return status;
}
pixman_image_set_component_alpha (surface->pixman_image,
pixman_image_get_component_alpha (image->pixman_image));
status = _cairo_user_data_array_set_data (&surface->base.user_data,
&wrap_image_key,
data,
_wrap_release_source_image);
if (status) {
cairo_surface_destroy (&surface->base);
free (data);
return status;
}
pixman_image_set_component_alpha (
surface->pixman_image,
pixman_image_get_component_alpha (image->pixman_image));
*out = surface;
return CAIRO_STATUS_SUCCESS;
}
/**
* _cairo_surface_clone_similar:
* @surface: a #cairo_surface_t
@ -1661,13 +1669,13 @@ _cairo_surface_clone_similar (cairo_surface_t *surface,
_cairo_surface_release_source_image (src, image, image_extra);
} else {
status =
surface->backend->clone_similar (surface, &image->base,
content,
src_x, src_y,
width, height,
clone_offset_x,
clone_offset_y,
clone_out);
surface->backend->clone_similar (surface, &image->base,
content,
src_x, src_y,
width, height,
clone_offset_x,
clone_offset_y,
clone_out);
cairo_surface_destroy(&image->base);
}
}

View File

@ -1,15 +1,10 @@
commit 367aa46142f7c0cf3405814487bbbbc7411b96a4
Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
Date: Thu Apr 23 15:42:55 2009 -0400
wrap source_image
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index a4a7084..e4c3752 100644
index 8278694..12f6242 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -1264,6 +1264,63 @@ _cairo_surface_release_dest_image (cairo_surface_t *surface,
image, image_rect, image_extra);
@@ -1530,6 +1530,70 @@ _cairo_recording_surface_clone_similar (cairo_surface_t *surface,
return CAIRO_STATUS_SUCCESS;
}
+struct acquire_source_image_data
@ -23,7 +18,9 @@ index a4a7084..e4c3752 100644
+_wrap_release_source_image (void *data)
+{
+ struct acquire_source_image_data *acquire_data = data;
+ _cairo_surface_release_source_image (acquire_data->src, acquire_data->image, acquire_data->image_extra);
+ _cairo_surface_release_source_image (acquire_data->src,
+ acquire_data->image,
+ acquire_data->image_extra);
+ free(data);
+}
+
@ -37,59 +34,70 @@ index a4a7084..e4c3752 100644
+ cairo_image_surface_t *surface;
+ cairo_status_t status;
+
+ struct acquire_source_image_data *data = malloc(sizeof(*data));
+ struct acquire_source_image_data *data = malloc (sizeof (*data));
+ if (unlikely (data == NULL))
+ return _cairo_error (CAIRO_STATUS_NO_MEMORY);
+ data->src = src;
+ data->image = image;
+ data->image_extra = image_extra;
+
+ surface = (cairo_image_surface_t*)cairo_image_surface_create_for_data (image->data,
+ image->format,
+ image->width,
+ image->height,
+ image->stride);
+ surface = (cairo_image_surface_t *)
+ _cairo_image_surface_create_with_pixman_format (image->data,
+ image->pixman_format,
+ image->width,
+ image->height,
+ image->stride);
+ status = surface->base.status;
+ if (status)
+ return status;
+
+ status = _cairo_user_data_array_set_data (&surface->base.user_data,
+ &wrap_image_key,
+ data,
+ _wrap_release_source_image);
+ if (status) {
+ cairo_surface_destroy (&surface->base);
+ free (data);
+ return status;
+ }
+
+ pixman_image_set_component_alpha (surface->pixman_image,
+ pixman_image_get_component_alpha (surface->pixman_image));
+ status = _cairo_user_data_array_set_data (&surface->base.user_data,
+ &wrap_image_key,
+ data,
+ _wrap_release_source_image);
+ if (status) {
+ cairo_surface_destroy (&surface->base);
+ free (data);
+ return status;
+ }
+
+ pixman_image_set_component_alpha (
+ surface->pixman_image,
+ pixman_image_get_component_alpha (surface->pixman_image));
+
+ *out = surface;
+ return CAIRO_STATUS_SUCCESS;
+}
+
+
+
/**
* _cairo_surface_clone_similar:
* @surface: a #cairo_surface_t
@@ -1342,15 +1399,19 @@ _cairo_surface_clone_similar (cairo_surface_t *surface,
@@ -1606,15 +1670,19 @@ _cairo_surface_clone_similar (cairo_surface_t *surface,
/* If we failed, try again with an image surface */
status = _cairo_surface_acquire_source_image (src, &image, &image_extra);
if (status == CAIRO_STATUS_SUCCESS) {
- status =
- surface->backend->clone_similar (surface, &image->base,
- src_x, src_y,
- width, height,
- clone_offset_x,
- clone_offset_y,
- clone_out);
-
- _cairo_surface_release_source_image (src, image, image_extra);
+ status = _wrap_image(src, image, image_extra, &image);
+ if (status != CAIRO_STATUS_SUCCESS) {
+ _cairo_surface_release_source_image (src, image, image_extra);
+ } else {
+ status =
surface->backend->clone_similar (surface, &image->base,
src_x, src_y,
width, height,
clone_offset_x,
clone_offset_y,
clone_out);
-
- _cairo_surface_release_source_image (src, image, image_extra);
+ surface->backend->clone_similar (surface, &image->base,
+ src_x, src_y,
+ width, height,
+ clone_offset_x,
+ clone_offset_y,
+ clone_out);
+ cairo_surface_destroy(&image->base);
+ }
}

View File

@ -67,6 +67,7 @@ class nsIAtom;
// pref lang id's for font prefs
// !!! needs to match the list of pref font.default.xx entries listed in all.js !!!
// !!! don't use as bit mask, this may grow larger !!!
enum eFontPrefLang {
eFontPrefLang_Western = 0,

View File

@ -549,13 +549,20 @@ gfxPlatform::GetFontPrefLangFor(PRUint8 aUnicodeRange)
}
}
const PRUint32 kFontPrefLangCJKMask = (1 << (PRUint32) eFontPrefLang_Japanese) | (1 << (PRUint32) eFontPrefLang_ChineseTW)
| (1 << (PRUint32) eFontPrefLang_ChineseCN) | (1 << (PRUint32) eFontPrefLang_ChineseHK)
| (1 << (PRUint32) eFontPrefLang_Korean) | (1 << (PRUint32) eFontPrefLang_CJKSet);
PRBool
gfxPlatform::IsLangCJK(eFontPrefLang aLang)
{
return kFontPrefLangCJKMask & (1 << (PRUint32) aLang);
switch (aLang) {
case eFontPrefLang_Japanese:
case eFontPrefLang_ChineseTW:
case eFontPrefLang_ChineseCN:
case eFontPrefLang_ChineseHK:
case eFontPrefLang_Korean:
case eFontPrefLang_CJKSet:
return PR_TRUE;
default:
return PR_FALSE;
}
}
void

View File

@ -76,35 +76,37 @@ const PRUint8 kRangeTibetan = 26;
const PRUint8 kRangeSpecificItemNum = 27;
//range/rangeSet grow to this place 27-30
//range/rangeSet grow to this place 27-29
const PRUint8 kRangeSetStart = 31; // range set definition starts from here
const PRUint8 kRangeSetLatin = 31;
const PRUint8 kRangeSetCJK = 32;
const PRUint8 kRangeSetEnd = 32; // range set definition ends here
const PRUint8 kRangeSetStart = 30; // range set definition starts from here
const PRUint8 kRangeSetLatin = 30;
const PRUint8 kRangeSetCJK = 31;
const PRUint8 kRangeSetEnd = 31; // range set definition ends here, this
// and smaller ranges are used as bit
// mask, don't increase this value.
// less frequently used range definition
const PRUint8 kRangeSurrogate = 33;
const PRUint8 kRangePrivate = 34;
const PRUint8 kRangeMisc = 35;
const PRUint8 kRangeUnassigned = 36;
const PRUint8 kRangeSyriac = 37;
const PRUint8 kRangeThaana = 38;
const PRUint8 kRangeLao = 39;
const PRUint8 kRangeMyanmar = 40;
const PRUint8 kRangeCherokee = 41;
const PRUint8 kRangeOghamRunic = 42;
const PRUint8 kRangeMongolian = 43;
const PRUint8 kRangeMathOperators = 44;
const PRUint8 kRangeMiscTechnical = 45;
const PRUint8 kRangeControlOpticalEnclose = 46;
const PRUint8 kRangeBoxBlockGeometrics = 47;
const PRUint8 kRangeMiscSymbols = 48;
const PRUint8 kRangeDingbats = 49;
const PRUint8 kRangeBraillePattern = 50;
const PRUint8 kRangeYi = 51;
const PRUint8 kRangeCombiningDiacriticalMarks = 52;
const PRUint8 kRangeSpecials = 53;
const PRUint8 kRangeSurrogate = 32;
const PRUint8 kRangePrivate = 33;
const PRUint8 kRangeMisc = 34;
const PRUint8 kRangeUnassigned = 35;
const PRUint8 kRangeSyriac = 36;
const PRUint8 kRangeThaana = 37;
const PRUint8 kRangeLao = 38;
const PRUint8 kRangeMyanmar = 39;
const PRUint8 kRangeCherokee = 40;
const PRUint8 kRangeOghamRunic = 41;
const PRUint8 kRangeMongolian = 42;
const PRUint8 kRangeMathOperators = 43;
const PRUint8 kRangeMiscTechnical = 44;
const PRUint8 kRangeControlOpticalEnclose = 45;
const PRUint8 kRangeBoxBlockGeometrics = 46;
const PRUint8 kRangeMiscSymbols = 47;
const PRUint8 kRangeDingbats = 48;
const PRUint8 kRangeBraillePattern = 49;
const PRUint8 kRangeYi = 50;
const PRUint8 kRangeCombiningDiacriticalMarks = 51;
const PRUint8 kRangeSpecials = 52;
const PRUint8 kRangeTableBase = 128; //values over 127 are reserved for internal use only
const PRUint8 kRangeTertiaryTable = 145; // leave room for 16 subtable

View File

@ -2321,7 +2321,7 @@ alpha*-*-osf*)
MOZ_FIX_LINK_PATHS=
AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
CFLAGS="$CFLAGS -xlibmieee -xstrconst -xbuiltin=%all"
CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife -norunpath"
CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic -norunpath"
LDFLAGS="-xildoff -z lazyload -z combreloc $LDFLAGS"
if test -z "$CROSS_COMPILE" && test -f /usr/lib/ld/map.noexstk; then
_SAVE_LDFLAGS=$LDFLAGS
@ -4531,13 +4531,8 @@ dnl Sun Studio on Solaris
if test "$SOLARIS_SUNPRO_CC"; then
PROFILE_GEN_CFLAGS="-xprofile=collect:$_objdir/$enable_application"
PROFILE_GEN_LDFLAGS="-xprofile=collect:$_objdir/$enable_application"
if test "$CPU_ARCH" != "sparc"; then
PROFILE_USE_CFLAGS="-xprofile=use:$_objdir/$enable_application"
PROFILE_USE_LDFLAGS="-xprofile=use:$_objdir/$enable_application"
else
PROFILE_USE_CFLAGS="-xlinkopt=2 -xprofile=use:$_objdir/$enable_application"
PROFILE_USE_LDFLAGS="-xlinkopt=2 -xprofile=use:$_objdir/$enable_application"
fi
PROFILE_USE_CFLAGS="-xprofile=use:$_objdir/$enable_application"
PROFILE_USE_LDFLAGS="-xprofile=use:$_objdir/$enable_application"
fi
AC_SUBST(PROFILE_GEN_CFLAGS)

View File

@ -1819,8 +1819,8 @@ nsresult
Loader::LoadInlineStyle(nsIContent* aElement,
nsIUnicharInputStream* aStream,
PRUint32 aLineNumber,
const nsSubstring& aTitle,
const nsSubstring& aMedia,
const nsAString& aTitle,
const nsAString& aMedia,
nsICSSLoaderObserver* aObserver,
PRBool* aCompleted,
PRBool* aIsAlternate)
@ -1889,8 +1889,8 @@ Loader::LoadInlineStyle(nsIContent* aElement,
nsresult
Loader::LoadStyleLink(nsIContent* aElement,
nsIURI* aURL,
const nsSubstring& aTitle,
const nsSubstring& aMedia,
const nsAString& aTitle,
const nsAString& aMedia,
PRBool aHasAlternateRel,
nsICSSLoaderObserver* aObserver,
PRBool* aIsAlternate)

View File

@ -55,6 +55,14 @@ CPPSRCS = $(error XPTCall not implemented on this platform!)
# Force use of PIC
FORCE_USE_PIC = 1
ifeq ($(OS_ARCH),SunOS)
ifneq (86,$(findstring 86,$(OS_TEST)))
# disable PGO for this directory with Sun Studio on SPARC because
# compiling with xprofile=collect will insert code into nsXPTCStubBase::Stub##n
NO_PROFILE_GUIDED_OPTIMIZE = 1
endif
endif
include $(topsrcdir)/config/config.mk
######################################################################
@ -435,10 +443,6 @@ ASFILES := xptcinvoke_asm_sparc_solaris_GCC.s xptcstubs_asm_sparc_solaris.s
endif
else
# disable PGO for this directory with Sun Studio on SPARC
# because compiling with xprofile=collect will insert code into nsXPTCStubBase::Stub##n
NO_PROFILE_GUIDED_OPTIMIZE = 1
ifdef HAVE_64BIT_OS
ASFILES := xptcinvoke_asm_sparcv9_solaris_SUNW.s xptcstubs_asm_sparcv9_solaris.s
else