/hg/icedtea7-forest/jdk: 17 new changesets
andrew at icedtea.classpath.org
andrew at icedtea.classpath.org
Wed Jul 20 02:18:25 UTC 2016
changeset 4c22fc4c3833 in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=4c22fc4c3833
author: bae
date: Mon Dec 24 14:22:23 2012 +0400
8005402, PR3020: Need to provide benchmarks for color management
Reviewed-by: jgodinez, prr
changeset 5ee9ef1d0b2d in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=5ee9ef1d0b2d
author: bae
date: Tue Oct 23 13:10:52 2012 +0400
7051394, PR3020: NullPointerException when running regression tests LoadProfileTest by using openjdk-7-b144
Reviewed-by: jgodinez, prr
changeset 88c81c7ac869 in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=88c81c7ac869
author: andrew
date: Fri Jul 08 02:00:13 2016 +0100
8151841, PR3098: Build needs additional flags to compile with GCC 6
Summary: C++ standard needs to be explicitly set and some optimisations turned off to build on GCC 6
Reviewed-by: erikj, dholmes, kbarrett
changeset 35ea30b9068a in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=35ea30b9068a
author: bae
date: Mon Jul 18 16:36:48 2016 +0100
7124245, PR3020: [lcms] ColorConvertOp to color space CS_GRAY apparently converts orange to 244,244,0
Reviewed-by: prr
changeset cc0614f20419 in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=cc0614f20419
author: bae
date: Mon Jul 18 17:45:32 2016 +0100
8005530, PR3020: [lcms] Improve performance of ColorConverOp for default destinations
Reviewed-by: prr, jgodinez
changeset c74c52a31c64 in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=c74c52a31c64
author: anashaty
date: Tue Jul 08 17:47:47 2014 +0400
8047066, PR3020: Test test/sun/awt/image/bug8038000.java fails with ClassCastException
Reviewed-by: bae, prr
changeset e7f735d92c5c in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=e7f735d92c5c
author: bae
date: Mon Jul 18 18:07:23 2016 +0100
8005930, PR3020: [lcms] ColorConvertOp: Alpha channel is not transferred from source to destination.
Reviewed-by: prr
changeset bffb172306db in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=bffb172306db
author: bae
date: Thu Jun 06 13:57:25 2013 +0400
8013430, PR3020: REGRESSION: closed/java/awt/color/ICC_Profile/LoadProfileTest/LoadProfileTest.java fails with java.io.StreamCorruptedException: invalid type code: EE since 8b87
Reviewed-by: prr, vadim
changeset 7e6d1fe62c4c in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=7e6d1fe62c4c
author: bae
date: Mon Jul 18 19:01:07 2016 +0100
7043064, PR3020: sun/java2d/cmm/ tests failed against RI b141 & b138-nightly
Reviewed-by: prr, vadim
changeset 6f9bce2ddda6 in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=6f9bce2ddda6
author: bae
date: Tue Sep 10 21:54:14 2013 +0400
8024511, PR3020: Crash during color profile destruction
Reviewed-by: vadim, prr
changeset 19211caca73f in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=19211caca73f
author: jchen
date: Tue Oct 15 14:16:27 2013 -0700
8025429, PR3020: [parfait] warnings from b107 for sun.java2d.cmm: JNI exception pending
Reviewed-by: prr, bae
changeset 2d3caec4a8c4 in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=2d3caec4a8c4
author: bae
date: Wed Oct 16 17:13:15 2013 +0400
8026702, PR3020: Fix for 8025429 breaks jdk build on windows
Reviewed-by: serb
changeset 322e1901d8ba in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=322e1901d8ba
author: bae
date: Tue Oct 22 13:28:44 2013 +0400
8026780, PR3020: Crash on PPC and PPC v2 for Java_awt test suit
Reviewed-by: prr, jchen
changeset 43efac8a0030 in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=43efac8a0030
author: andrew
date: Tue Jul 19 04:12:40 2016 +0100
PR2799: Files are missing from resources.jar
Summary: Compile and filter list of files from IMPORTSRCDIR and add to resources.jar
changeset 830b7280229e in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=830b7280229e
author: ssadetsky
date: Tue Jul 19 04:27:11 2016 +0100
6260348, PR3067: GTK+ L&F JTextComponent not respecting desktop caret blink rate
Reviewed-by: alexsch, azvegint
changeset a3efeb9f5fdb in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=a3efeb9f5fdb
author: aph
date: Mon Jul 04 17:08:12 2016 +0100
8158260, PR2992, RH1341258: PPC64: unaligned Unsafe.getInt can lead to the generation of illegal instructions
Summary: Adjust instruction generation. Includes portions of 8026049 for test case.
Reviewed-by: dholmes, jrose, psandoz, kvn
changeset 2cc4f0833284 in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=2cc4f0833284
author: darcy
date: Fri Aug 12 13:36:39 2011 -0700
4900206, PR3101: Include worst-case rounding tests for Math library functions
Reviewed-by: alanb
diffstat:
make/common/Defs-linux.gmk | 10 +-
make/common/Release.gmk | 32 +-
make/sun/cmm/lcms/Makefile | 3 +
make/sun/cmm/lcms/mapfile-vers | 12 +-
src/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java | 6 +-
src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java | 14 +-
src/share/classes/java/awt/color/ICC_Profile.java | 76 +-
src/share/classes/java/awt/color/ICC_ProfileGray.java | 6 +-
src/share/classes/java/awt/color/ICC_ProfileRGB.java | 6 +-
src/share/classes/java/nio/Bits.java | 35 +-
src/share/classes/sun/java2d/cmm/CMSManager.java | 44 +-
src/share/classes/sun/java2d/cmm/PCMM.java | 14 +-
src/share/classes/sun/java2d/cmm/Profile.java | 43 +
src/share/classes/sun/java2d/cmm/ProfileDataVerifier.java | 114 ++
src/share/classes/sun/java2d/cmm/lcms/LCMS.java | 137 ++-
src/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java | 309 +++-
src/share/classes/sun/java2d/cmm/lcms/LCMSProfile.java | 109 ++
src/share/classes/sun/java2d/cmm/lcms/LCMSTransform.java | 65 +-
src/share/classes/sun/misc/Unsafe.java | 23 +
src/share/classes/sun/security/provider/ByteArrayAccess.java | 9 +-
src/share/demo/java2d/J2DBench/build.xml | 14 +-
src/share/demo/java2d/J2DBench/resources/cmm_images/img_icc_large.jpg | Bin
src/share/demo/java2d/J2DBench/resources/cmm_images/img_icc_medium.jpg | Bin
src/share/demo/java2d/J2DBench/resources/cmm_images/img_icc_small.jpg | Bin
src/share/demo/java2d/J2DBench/src/j2dbench/J2DBench.java | 2 +
src/share/demo/java2d/J2DBench/src/j2dbench/tests/cmm/CMMTests.java | 153 ++
src/share/demo/java2d/J2DBench/src/j2dbench/tests/cmm/ColorConversionTests.java | 60 +
src/share/demo/java2d/J2DBench/src/j2dbench/tests/cmm/ColorConvertOpTests.java | 383 +++++++
src/share/demo/java2d/J2DBench/src/j2dbench/tests/cmm/DataConversionTests.java | 198 +++
src/share/demo/java2d/J2DBench/src/j2dbench/tests/cmm/EmbeddedProfileTests.java | 166 +++
src/share/demo/java2d/J2DBench/src/j2dbench/tests/cmm/ProfileTests.java | 132 ++
src/share/native/sun/java2d/cmm/lcms/LCMS.c | 545 +++++----
src/solaris/native/sun/awt/gtk2_interface.c | 27 +-
src/solaris/native/sun/awt/gtk2_interface.h | 6 +-
test/java/lang/Math/Tests.java | 36 +-
test/java/lang/Math/WorstCaseTests.java | 435 +++++++
test/sun/awt/image/bug8038000.java | 4 +-
test/sun/java2d/cmm/ColorConvertOp/AlphaTest.java | 99 +
test/sun/java2d/cmm/ColorConvertOp/GrayTest.java | 102 +
test/sun/java2d/cmm/ProfileOp/DisposalCrashTest.java | 83 +
test/sun/java2d/cmm/ProfileOp/ReadWriteProfileTest.java | 34 +-
41 files changed, 3030 insertions(+), 516 deletions(-)
diffs (truncated from 4738 to 500 lines):
diff -r 043089a31c3c -r 2cc4f0833284 make/common/Defs-linux.gmk
--- a/make/common/Defs-linux.gmk Thu Jun 30 03:43:26 2016 +0100
+++ b/make/common/Defs-linux.gmk Fri Aug 12 13:36:39 2011 -0700
@@ -36,7 +36,7 @@
# CFLAGS (set $(OTHER_CFLAGS) instead)
# CPPFLAGS (set $(OTHER_CPPFLAGS) instead)
# CXXFLAGS (set $(OTHER_CXXFLAGS) instead)
-# LDFLAGS (set $(OTHER_LDFAGS) instead)
+# LDFLAGS (set $(OTHER_LDFLAGS) instead)
# LDLIBS (set $(EXTRA_LIBS) instead)
# LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
@@ -239,6 +239,12 @@
CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH))
LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH))
endif
+# GCC 6 has more aggressive dead-store elimination which causes the VM to crash
+# It also optimises away null pointer checks which are still needed.
+# We turn both of these optimisations off.
+ifeq ($(shell $(EXPR) $(CC_MAJORVER) \>= 6 ),1)
+ CFLAGS_REQUIRED += -fno-delete-null-pointer-checks -fno-lifetime-dse
+endif
# If this is a --hash-style=gnu system, use --hash-style=both
# The gnu .hash section won't work on some Linux systems like SuSE 10.
@@ -303,7 +309,7 @@
CFLAGS_DBG = $(DEBUG_FLAG)
CFLAGS_COMMON += $(CFLAGS_REQUIRED)
-CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
+CXXFLAGS_COMMON = -std=gnu++98 $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
CXXFLAGS_OPT = $(CC_OPT)
CXXFLAGS_DBG = $(DEBUG_FLAG)
CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
diff -r 043089a31c3c -r 2cc4f0833284 make/common/Release.gmk
--- a/make/common/Release.gmk Thu Jun 30 03:43:26 2016 +0100
+++ b/make/common/Release.gmk Fri Aug 12 13:36:39 2011 -0700
@@ -218,9 +218,11 @@
ifneq ($(COMPRESS_JARS), true)
CREATE_JAR_OPTS = c0mf
CREATE_JAR_OPTS_NOMANIFEST = c0f
+ UPDATE_JAR_OPTS = u0f
else
CREATE_JAR_OPTS = cmf
CREATE_JAR_OPTS_NOMANIFEST = cf
+ UPDATE_JAR_OPTS = uf
endif
#
@@ -632,7 +634,21 @@
$(ECHO) "jdk/internal/jfr/events/" >> $@
endif
+######################################################
+# List of directories in impsrc directory that should NOT be in resources.jar
+######################################################
+NOT_RESOURCE_JAR_LIST = $(ABS_TEMPDIR)/not_resource_jar.list
+
+$(NOT_RESOURCE_JAR_LIST): FRC
+ $(prep-target)
+ $(ECHO) "#\n" >> $@
+ $(ECHO) "# List of subdirectories not to include in resources.jar" >> $@
+ $(ECHO) "# Directories must contain trailing '/'." >> $@
+ $(ECHO) "com/" >> $@
+ $(ECHO) "javax/" >> $@
+ $(ECHO) "org/" >> $@
+ $(ECHO) "sun/" >> $@
# File order list for rt.jar
# - sun.applet is included, till hotjava stops relying on it.
@@ -644,6 +660,7 @@
JARFILELISTS_TEMPDIR=$(ABS_TEMPDIR)/jarfilelists
RT_JAR_FILELIST=$(JARFILELISTS_TEMPDIR)/rt_jar_list
RES_JAR_FILELIST=$(JARFILELISTS_TEMPDIR)/resources_jar_list
+IMPORT_JAR_FILELIST=$(JARFILELISTS_TEMPDIR)/imp_file_list
JARREORDER_JARFILE = $(ABS_BUILDTOOLJARDIR)/jarreorder.jar
@@ -656,6 +673,15 @@
$(MV) $@.temp $@
@($(CD) $(CLASSBINDIR) && $(java-vm-cleanup))
+$(IMPORT_JAR_FILELIST): $(JARREORDER_JARFILE) $(NOT_RESOURCE_JAR_LIST)
+ $(prep-target)
+ $(RM) $@.temp
+ ($(CD) $(IMPORTSRCDIR) && \
+ $(BOOT_JAVA_CMD) -jar $(JARREORDER_JARFILE) \
+ -o $@.temp - $(NOT_RESOURCE_JAR_LIST) . )
+ $(MV) $@.temp $@
+ @($(CD) $(IMPORTSRCDIR) && $(java-vm-cleanup))
+
# Create jfr.jar
JFR_JAR=
ifeq ($(BUILD_JFR), true)
@@ -700,12 +726,16 @@
# Create resources.jar containing non-class files
RESOURCES_JAR=$(ABS_TEMPDIR)/resources-orig.jar
-$(RESOURCES_JAR): $(RES_JAR_FILELIST) $(OTHER_JAR_MANIFEST_FILE)
+$(RESOURCES_JAR): $(RES_JAR_FILELIST) $(OTHER_JAR_MANIFEST_FILE) $(IMPORT_JAR_FILELIST)
$(prep-target)
$(CD) $(CLASSBINDIR) && \
$(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(OTHER_JAR_MANIFEST_FILE) $@ \
@$(RES_JAR_FILELIST) $(BOOT_JAR_JFLAGS)
+ $(CD) $(IMPORTSRCDIR) && \
+ $(BOOT_JAR_CMD) $(UPDATE_JAR_OPTS) $@ \
+ @$(IMPORT_JAR_FILELIST) $(BOOT_JAR_JFLAGS)
@$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
+ @$(CD) $(IMPORTSRCDIR) && $(java-vm-cleanup)
# Create jsse.jar containing SunJSSE implementation classes
JSSE_JAR=$(ABS_TEMPDIR)/jsse-orig.jar
diff -r 043089a31c3c -r 2cc4f0833284 make/sun/cmm/lcms/Makefile
--- a/make/sun/cmm/lcms/Makefile Thu Jun 30 03:43:26 2016 +0100
+++ b/make/sun/cmm/lcms/Makefile Fri Aug 12 13:36:39 2011 -0700
@@ -29,6 +29,9 @@
LIBRARY = javalcms
PRODUCT = sun
+# Use highest level of optimization on this library
+OPTIMIZATION_LEVEL = HIGHEST
+
include $(BUILDDIR)/common/Defs.gmk
#
diff -r 043089a31c3c -r 2cc4f0833284 make/sun/cmm/lcms/mapfile-vers
--- a/make/sun/cmm/lcms/mapfile-vers Thu Jun 30 03:43:26 2016 +0100
+++ b/make/sun/cmm/lcms/mapfile-vers Fri Aug 12 13:36:39 2011 -0700
@@ -27,13 +27,11 @@
SUNWprivate_1.1 {
global:
- Java_sun_java2d_cmm_lcms_LCMS_loadProfile;
- Java_sun_java2d_cmm_lcms_LCMS_freeProfile;
- Java_sun_java2d_cmm_lcms_LCMS_getProfileSize;
- Java_sun_java2d_cmm_lcms_LCMS_getProfileData;
- Java_sun_java2d_cmm_lcms_LCMS_getTagSize;
- Java_sun_java2d_cmm_lcms_LCMS_getTagData;
- Java_sun_java2d_cmm_lcms_LCMS_setTagData;
+ Java_sun_java2d_cmm_lcms_LCMS_loadProfileNative;
+ Java_sun_java2d_cmm_lcms_LCMS_getProfileSizeNative;
+ Java_sun_java2d_cmm_lcms_LCMS_getProfileDataNative;
+ Java_sun_java2d_cmm_lcms_LCMS_getTagNative;
+ Java_sun_java2d_cmm_lcms_LCMS_setTagDataNative;
Java_sun_java2d_cmm_lcms_LCMS_colorConvert;
Java_sun_java2d_cmm_lcms_LCMS_getProfileID;
Java_sun_java2d_cmm_lcms_LCMS_initLCMS;
diff -r 043089a31c3c -r 2cc4f0833284 src/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java
--- a/src/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java Thu Jun 30 03:43:26 2016 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java Fri Aug 12 13:36:39 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -94,7 +94,9 @@
static enum Settings {
GTK_FONT_NAME,
GTK_ICON_SIZES,
- GTK_BUTTON_ORDER
+ GTK_BUTTON_ORDER,
+ GTK_CURSOR_BLINK,
+ GTK_CURSOR_BLINK_TIME
}
/* Custom regions are needed for representing regions that don't exist
diff -r 043089a31c3c -r 2cc4f0833284 src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java
--- a/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java Thu Jun 30 03:43:26 2016 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java Fri Aug 12 13:36:39 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -371,7 +371,17 @@
int vProgWidth = 22 - (progXThickness * 2);
int vProgHeight = 80 - (progYThickness * 2);
- Integer caretBlinkRate = Integer.valueOf(500);
+ Integer caretBlinkRate;
+ if (Boolean.FALSE.equals(GTKEngine.INSTANCE.getSetting(
+ GTKEngine.Settings.GTK_CURSOR_BLINK))) {
+ caretBlinkRate = Integer.valueOf(0);
+ } else {
+ caretBlinkRate = (Integer) GTKEngine.INSTANCE.getSetting(
+ GTKEngine.Settings.GTK_CURSOR_BLINK_TIME);
+ if (caretBlinkRate == null) {
+ caretBlinkRate = Integer.valueOf(500);
+ }
+ }
Insets zeroInsets = new InsetsUIResource(0, 0, 0, 0);
Double defaultCaretAspectRatio = new Double(0.025);
diff -r 043089a31c3c -r 2cc4f0833284 src/share/classes/java/awt/color/ICC_Profile.java
--- a/src/share/classes/java/awt/color/ICC_Profile.java Thu Jun 30 03:43:26 2016 +0100
+++ b/src/share/classes/java/awt/color/ICC_Profile.java Fri Aug 12 13:36:39 2011 -0700
@@ -37,6 +37,8 @@
import sun.java2d.cmm.PCMM;
import sun.java2d.cmm.CMSManager;
+import sun.java2d.cmm.Profile;
+import sun.java2d.cmm.ProfileDataVerifier;
import sun.java2d.cmm.ProfileDeferralMgr;
import sun.java2d.cmm.ProfileDeferralInfo;
import sun.java2d.cmm.ProfileActivator;
@@ -93,7 +95,7 @@
private static final long serialVersionUID = -3938515861990936766L;
- transient long ID;
+ private transient Profile cmmProfile;
private transient ProfileDeferralInfo deferralInfo;
private transient ProfileActivator profileActivator;
@@ -726,8 +728,8 @@
/**
* Constructs an ICC_Profile object with a given ID.
*/
- ICC_Profile(long ID) {
- this.ID = ID;
+ ICC_Profile(Profile p) {
+ this.cmmProfile = p;
}
@@ -750,8 +752,8 @@
* Frees the resources associated with an ICC_Profile object.
*/
protected void finalize () {
- if (ID != 0) {
- CMSManager.getModule().freeProfile(ID);
+ if (cmmProfile != null) {
+ CMSManager.getModule().freeProfile(cmmProfile);
} else if (profileActivator != null) {
ProfileDeferralMgr.unregisterDeferral(profileActivator);
}
@@ -769,39 +771,41 @@
public static ICC_Profile getInstance(byte[] data) {
ICC_Profile thisProfile;
- long theID;
+ Profile p = null;
if (ProfileDeferralMgr.deferring) {
ProfileDeferralMgr.activateProfiles();
}
+ ProfileDataVerifier.verify(data);
+
try {
- theID = CMSManager.getModule().loadProfile(data);
+ p = CMSManager.getModule().loadProfile(data);
} catch (CMMException c) {
throw new IllegalArgumentException("Invalid ICC Profile Data");
}
try {
- if ((getColorSpaceType (theID) == ColorSpace.TYPE_GRAY) &&
- (getData (theID, icSigMediaWhitePointTag) != null) &&
- (getData (theID, icSigGrayTRCTag) != null)) {
- thisProfile = new ICC_ProfileGray (theID);
+ if ((getColorSpaceType (p) == ColorSpace.TYPE_GRAY) &&
+ (getData (p, icSigMediaWhitePointTag) != null) &&
+ (getData (p, icSigGrayTRCTag) != null)) {
+ thisProfile = new ICC_ProfileGray (p);
}
- else if ((getColorSpaceType (theID) == ColorSpace.TYPE_RGB) &&
- (getData (theID, icSigMediaWhitePointTag) != null) &&
- (getData (theID, icSigRedColorantTag) != null) &&
- (getData (theID, icSigGreenColorantTag) != null) &&
- (getData (theID, icSigBlueColorantTag) != null) &&
- (getData (theID, icSigRedTRCTag) != null) &&
- (getData (theID, icSigGreenTRCTag) != null) &&
- (getData (theID, icSigBlueTRCTag) != null)) {
- thisProfile = new ICC_ProfileRGB (theID);
+ else if ((getColorSpaceType (p) == ColorSpace.TYPE_RGB) &&
+ (getData (p, icSigMediaWhitePointTag) != null) &&
+ (getData (p, icSigRedColorantTag) != null) &&
+ (getData (p, icSigGreenColorantTag) != null) &&
+ (getData (p, icSigBlueColorantTag) != null) &&
+ (getData (p, icSigRedTRCTag) != null) &&
+ (getData (p, icSigGreenTRCTag) != null) &&
+ (getData (p, icSigBlueTRCTag) != null)) {
+ thisProfile = new ICC_ProfileRGB (p);
}
else {
- thisProfile = new ICC_Profile (theID);
+ thisProfile = new ICC_Profile (p);
}
} catch (CMMException c) {
- thisProfile = new ICC_Profile (theID);
+ thisProfile = new ICC_Profile (p);
}
return thisProfile;
}
@@ -1116,7 +1120,7 @@
fileName);
}
try {
- ID = CMSManager.getModule().loadProfile(profileData);
+ cmmProfile = CMSManager.getModule().loadProfile(profileData);
} catch (CMMException c) {
ProfileDataException pde = new
ProfileDataException("Invalid ICC Profile Data" + fileName);
@@ -1226,14 +1230,14 @@
causing a deferred profile
to be loaded */
}
- return getColorSpaceType(ID);
+ return getColorSpaceType(cmmProfile);
}
- static int getColorSpaceType(long profileID) {
+ static int getColorSpaceType(Profile p) {
byte[] theHeader;
int theColorSpaceSig, theColorSpace;
- theHeader = getData(profileID, icSigHead);
+ theHeader = getData(p, icSigHead);
theColorSpaceSig = intFromBigEndian(theHeader, icHdrColorSpace);
theColorSpace = iccCStoJCS (theColorSpaceSig);
return theColorSpace;
@@ -1255,15 +1259,15 @@
if (ProfileDeferralMgr.deferring) {
ProfileDeferralMgr.activateProfiles();
}
- return getPCSType(ID);
+ return getPCSType(cmmProfile);
}
- static int getPCSType(long profileID) {
+ static int getPCSType(Profile p) {
byte[] theHeader;
int thePCSSig, thePCS;
- theHeader = getData(profileID, icSigHead);
+ theHeader = getData(p, icSigHead);
thePCSSig = intFromBigEndian(theHeader, icHdrPcs);
thePCS = iccCStoJCS(thePCSSig);
return thePCS;
@@ -1323,12 +1327,12 @@
PCMM mdl = CMSManager.getModule();
/* get the number of bytes needed for this profile */
- profileSize = mdl.getProfileSize(ID);
+ profileSize = mdl.getProfileSize(cmmProfile);
profileData = new byte [profileSize];
/* get the data for the profile */
- mdl.getProfileData(ID, profileData);
+ mdl.getProfileData(cmmProfile, profileData);
return profileData;
}
@@ -1355,11 +1359,11 @@
ProfileDeferralMgr.activateProfiles();
}
- return getData(ID, tagSignature);
+ return getData(cmmProfile, tagSignature);
}
- static byte[] getData(long profileID, int tagSignature) {
+ static byte[] getData(Profile p, int tagSignature) {
int tagSize;
byte[] tagData;
@@ -1367,12 +1371,12 @@
PCMM mdl = CMSManager.getModule();
/* get the number of bytes needed for this tag */
- tagSize = mdl.getTagSize(profileID, tagSignature);
+ tagSize = mdl.getTagSize(p, tagSignature);
tagData = new byte[tagSize]; /* get an array for the tag */
/* get the tag's data */
- mdl.getTagData(profileID, tagSignature, tagData);
+ mdl.getTagData(p, tagSignature, tagData);
} catch(CMMException c) {
tagData = null;
}
@@ -1403,7 +1407,7 @@
ProfileDeferralMgr.activateProfiles();
}
- CMSManager.getModule().setTagData(ID, tagSignature, tagData);
+ CMSManager.getModule().setTagData(cmmProfile, tagSignature, tagData);
}
/**
diff -r 043089a31c3c -r 2cc4f0833284 src/share/classes/java/awt/color/ICC_ProfileGray.java
--- a/src/share/classes/java/awt/color/ICC_ProfileGray.java Thu Jun 30 03:43:26 2016 +0100
+++ b/src/share/classes/java/awt/color/ICC_ProfileGray.java Fri Aug 12 13:36:39 2011 -0700
@@ -35,7 +35,7 @@
package java.awt.color;
-import java.awt.image.LookupTable;
+import sun.java2d.cmm.Profile;
import sun.java2d.cmm.ProfileDeferralInfo;
/**
@@ -76,8 +76,8 @@
/**
* Constructs a new ICC_ProfileGray from a CMM ID.
*/
- ICC_ProfileGray(long ID) {
- super(ID);
+ ICC_ProfileGray(Profile p) {
+ super(p);
}
/**
diff -r 043089a31c3c -r 2cc4f0833284 src/share/classes/java/awt/color/ICC_ProfileRGB.java
--- a/src/share/classes/java/awt/color/ICC_ProfileRGB.java Thu Jun 30 03:43:26 2016 +0100
+++ b/src/share/classes/java/awt/color/ICC_ProfileRGB.java Fri Aug 12 13:36:39 2011 -0700
@@ -35,7 +35,7 @@
package java.awt.color;
-import java.awt.image.LookupTable;
+import sun.java2d.cmm.Profile;
import sun.java2d.cmm.ProfileDeferralInfo;
/**
@@ -114,8 +114,8 @@
* @param ID The CMM ID for the profile.
*
*/
- ICC_ProfileRGB(long ID) {
- super(ID);
+ ICC_ProfileRGB(Profile p) {
+ super(p);
}
/**
diff -r 043089a31c3c -r 2cc4f0833284 src/share/classes/java/nio/Bits.java
--- a/src/share/classes/java/nio/Bits.java Thu Jun 30 03:43:26 2016 +0100
+++ b/src/share/classes/java/nio/Bits.java Fri Aug 12 13:36:39 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -562,32 +562,13 @@
// -- Processor and memory-system properties --
- private static final ByteOrder byteOrder;
+ private static final ByteOrder byteOrder
+ = unsafe.isBigEndian() ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN;
static ByteOrder byteOrder() {
- if (byteOrder == null)
- throw new Error("Unknown byte order");
return byteOrder;
}
- static {
- long a = unsafe.allocateMemory(8);
- try {
- unsafe.putLong(a, 0x0102030405060708L);
- byte b = unsafe.getByte(a);
- switch (b) {
- case 0x01: byteOrder = ByteOrder.BIG_ENDIAN; break;
- case 0x08: byteOrder = ByteOrder.LITTLE_ENDIAN; break;
- default:
- assert false;
- byteOrder = null;
- }
- } finally {
- unsafe.freeMemory(a);
- }
- }
-
-
private static int pageSize = -1;
static int pageSize() {
@@ -600,17 +581,9 @@
return (int)(size + (long)pageSize() - 1L) / pageSize();
}
- private static boolean unaligned;
- private static boolean unalignedKnown = false;
+ private static boolean unaligned = unsafe.unalignedAccess();
static boolean unaligned() {
- if (unalignedKnown)
More information about the distro-pkg-dev
mailing list