From aafc1e13c0903c1670cd11bd63f69c4f7558f766 Mon Sep 17 00:00:00 2001 From: Andrew John Hughes Date: Tue, 8 Jun 2010 17:52:47 +0100 Subject: [PATCH 1/4] 6959123: Remove use of obsolete png_check_sig function in splashscreen_png.c Avoid use of deprecated libpng macro (removed in some 1.4.x releases) Reviewed-by: prr --- jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c b/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c index 6c4b3a896a8..7a814d215f5 100644 --- a/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c +++ b/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c @@ -182,7 +182,7 @@ SplashDecodePngStream(Splash * splash, SplashStream * stream) int success = 0; stream->read(stream, sig, SIG_BYTES); - if (!png_check_sig(sig, SIG_BYTES)) { + if (png_sig_cmp(sig, 0, SIG_BYTES)) { goto done; } success = SplashDecodePng(splash, my_png_read_stream, stream); From 7313e1145f5d323af1a4d9eb3e8a7003908dd8ad Mon Sep 17 00:00:00 2001 From: Igor Nekrestyanov Date: Thu, 10 Jun 2010 15:00:30 -0700 Subject: [PATCH 2/4] 6952043: Incorrect JNI calls in fontpath.c Reviewed-by: jgodinez, prr --- jdk/src/windows/native/sun/font/fontpath.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/src/windows/native/sun/font/fontpath.c b/jdk/src/windows/native/sun/font/fontpath.c index 67a5aec7755..9c82f3dceb8 100644 --- a/jdk/src/windows/native/sun/font/fontpath.c +++ b/jdk/src/windows/native/sun/font/fontpath.c @@ -154,7 +154,7 @@ static int CALLBACK EnumFontFacesInFamilyProcA( fullname = JNU_NewStringPlatform(env, lpelfe->elfFullName); fullnameLC = (*env)->CallObjectMethod(env, fullname, fmi->toLowerCaseMID, fmi->locale); - (*env)->CallObjectMethod(env, fmi->list, fmi->addMID, fullname); + (*env)->CallBooleanMethod(env, fmi->list, fmi->addMID, fullname); (*env)->CallObjectMethod(env, fmi->fontToFamilyMap, fmi->putMID, fullnameLC, fmi->family); return 1; @@ -238,7 +238,7 @@ static int CALLBACK EnumFontFacesInFamilyProcW( wcslen((LPWSTR)lpelfe->elfFullName)); fullnameLC = (*env)->CallObjectMethod(env, fullname, fmi->toLowerCaseMID, fmi->locale); - (*env)->CallObjectMethod(env, fmi->list, fmi->addMID, fullname); + (*env)->CallBooleanMethod(env, fmi->list, fmi->addMID, fullname); (*env)->CallObjectMethod(env, fmi->fontToFamilyMap, fmi->putMID, fullnameLC, fmi->family); return 1; From cb437cbfe4e60427683250a9483d39899a80922a Mon Sep 17 00:00:00 2001 From: Mario Torre Date: Wed, 16 Jun 2010 20:46:10 +0200 Subject: [PATCH 3/4] 6961732: FontMetrics.getLeading() may be negative in freetype-based OpenJDK builds Fix premature integer roundings to preserve correct height, width and descent values for fonts Reviewed-by: prr --- .../share/native/sun/font/freetypeScaler.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native/sun/font/freetypeScaler.c index 39768c46738..c132a4a5a2c 100644 --- a/jdk/src/share/native/sun/font/freetypeScaler.c +++ b/jdk/src/share/native/sun/font/freetypeScaler.c @@ -490,22 +490,23 @@ Java_sun_font_FreetypeFontScaler_getFontMetricsNative( /* ascent */ ax = 0; - ay = -(jfloat) FT26Dot6ToFloat( - scalerInfo->face->size->metrics.ascender + - bmodifier/2); + ay = -(jfloat) FT26Dot6ToFloat(FT_MulFix( + ((jlong) scalerInfo->face->ascender + bmodifier/2), + (jlong) scalerInfo->face->size->metrics.y_scale)); /* descent */ dx = 0; - dy = -(jfloat) FT26Dot6ToFloat( - scalerInfo->face->size->metrics.descender + - bmodifier/2); + dy = -(jfloat) FT26Dot6ToFloat(FT_MulFix( + ((jlong) scalerInfo->face->descender + bmodifier/2), + (jlong) scalerInfo->face->size->metrics.y_scale)); /* baseline */ bx = by = 0; /* leading */ lx = 0; - ly = (jfloat) FT26Dot6ToFloat( - scalerInfo->face->size->metrics.height + - bmodifier) + ay - dy; + ly = (jfloat) FT26Dot6ToFloat(FT_MulFix( + (jlong) scalerInfo->face->height + bmodifier, + (jlong) scalerInfo->face->size->metrics.y_scale)) + + ay - dy; /* max advance */ mx = (jfloat) FT26Dot6ToFloat( scalerInfo->face->size->metrics.max_advance + From ee0a2ddfe6e1cbf3809d2628a09e283d888b5a3b Mon Sep 17 00:00:00 2001 From: Phil Race Date: Fri, 18 Jun 2010 11:00:14 -0700 Subject: [PATCH 4/4] 6961633: gui applications cause a jvm crash on windows Reviewed-by: ceisserer, bae --- jdk/make/sun/pisces/Makefile | 8 +++++++- .../META-INF/services/sun.java2d.pipe.RenderingEngine | 5 +---- .../META-INF/services/sun.java2d.pipe.RenderingEngine | 5 +++++ 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 jdk/src/solaris/classes/sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine diff --git a/jdk/make/sun/pisces/Makefile b/jdk/make/sun/pisces/Makefile index cb0f0761def..7823361e8be 100644 --- a/jdk/make/sun/pisces/Makefile +++ b/jdk/make/sun/pisces/Makefile @@ -52,5 +52,11 @@ build: copy-files copy-files: $(FILES_copy) -$(SERVICEDIR)/%: $(SHARE_SRC)/classes/sun/java2d/pisces/META-INF/services/% +ifneq ($(PLATFORM), windows) + SERVICE_SRC = $(PLATFORM_SRC) +else + SERVICE_SRC = $(SHARE_SRC) +endif + +$(SERVICEDIR)/%: $(SERVICE_SRC)/classes/sun/java2d/pisces/META-INF/services/% $(install-file) diff --git a/jdk/src/share/classes/sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine b/jdk/src/share/classes/sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine index 66b2ae9c61a..607ff59051a 100644 --- a/jdk/src/share/classes/sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine +++ b/jdk/src/share/classes/sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine @@ -1,5 +1,2 @@ -# Jules Rendering Engine module -sun.java2d.jules.JulesRenderingEngine - # Pisces Rendering Engine module -sun.java2d.pisces.PiscesRenderingEngine \ No newline at end of file +sun.java2d.pisces.PiscesRenderingEngine diff --git a/jdk/src/solaris/classes/sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine b/jdk/src/solaris/classes/sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine new file mode 100644 index 00000000000..c79fdbde9c8 --- /dev/null +++ b/jdk/src/solaris/classes/sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine @@ -0,0 +1,5 @@ +# Jules Rendering Engine module +sun.java2d.jules.JulesRenderingEngine + +# Pisces Rendering Engine module +sun.java2d.pisces.PiscesRenderingEngine