changeset in /hg/icedtea6: 2009-04-03 Lillian Angel <langel at re...
Lillian Angel
langel at redhat.com
Fri Apr 3 10:49:00 PDT 2009
changeset 5b9c566ab513 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=5b9c566ab513
description:
2009-04-03 Lillian Angel <langel at redhat.com>
* patches/icedtea-lcms.patch: Updated. Re-added _cmsModifyTag data
patch, which is upstream in OpenJDK6, but is not available in the
upstream lcms 1.18 sources.
diffstat:
2 files changed, 106 insertions(+), 260 deletions(-)
ChangeLog | 6
patches/icedtea-lcms.patch | 360 ++++++++++++--------------------------------
diffs (truncated from 886 to 500 lines):
diff -r 300bff72109a -r 5b9c566ab513 ChangeLog
--- a/ChangeLog Thu Apr 02 14:55:59 2009 -0400
+++ b/ChangeLog Fri Apr 03 13:49:06 2009 -0400
@@ -1,3 +1,9 @@ 2009-04-02 Deepak Bhole <dbhole at redhat.c
+2009-04-03 Lillian Angel <langel at redhat.com>
+
+ * patches/icedtea-lcms.patch: Updated. Re-added _cmsModifyTag data
+ patch, which is upstream in OpenJDK6, but is not available in the
+ upstream lcms 1.18 sources.
+
2009-04-02 Deepak Bhole <dbhole at redhat.com>
* IcedTeaPlugin.cc: Incremented timeout to 3 minutes. Added functions to
diff -r 300bff72109a -r 5b9c566ab513 patches/icedtea-lcms.patch
--- a/patches/icedtea-lcms.patch Thu Apr 02 14:55:59 2009 -0400
+++ b/patches/icedtea-lcms.patch Fri Apr 03 13:49:06 2009 -0400
@@ -1,6 +1,6 @@ diff -ruN openjdkold/jdk/src/share/nativ
diff -ruN openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam02.c openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam02.c
--- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam02.c 2008-11-25 04:06:03.000000000 -0500
-+++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam02.c 2009-03-26 15:13:30.000000000 -0400
++++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam02.c 2009-04-03 13:42:46.000000000 -0400
@@ -29,7 +29,7 @@
//
//
@@ -81,7 +81,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
diff -ruN openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam97.c openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam97.c
--- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam97.c 2008-11-25 04:06:03.000000000 -0500
-+++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam97.c 2009-03-26 15:13:30.000000000 -0400
++++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscam97.c 2009-04-03 13:42:46.000000000 -0400
@@ -29,7 +29,7 @@
//
//
@@ -120,7 +120,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
MAT3eval(&lpMod -> RGB_subw, &lpMod -> MlamRigg, &tmp);
diff -ruN openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c
--- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c 2008-11-25 04:06:03.000000000 -0500
-+++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c 2009-03-26 15:13:30.000000000 -0400
++++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c 2009-04-03 13:42:46.000000000 -0400
@@ -29,7 +29,7 @@
//
//
@@ -1564,7 +1564,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
LPIT8 it8 = (LPIT8) hIT8;
diff -ruN openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscnvrt.c openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscnvrt.c
--- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmscnvrt.c 2008-11-25 04:06:04.000000000 -0500
-+++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscnvrt.c 2009-03-26 15:13:30.000000000 -0400
++++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmscnvrt.c 2009-04-03 13:42:46.000000000 -0400
@@ -29,7 +29,7 @@
//
//
@@ -1592,7 +1592,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
+
diff -ruN openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmserr.c openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmserr.c
--- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmserr.c 2008-11-25 04:06:04.000000000 -0500
-+++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmserr.c 2009-03-26 15:13:30.000000000 -0400
++++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmserr.c 2009-04-03 13:42:46.000000000 -0400
@@ -29,7 +29,7 @@
//
//
@@ -1624,7 +1624,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
MB_OK|MB_ICONSTOP|MB_TASKMODAL);
diff -ruN openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmsgamma.c openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsgamma.c
--- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmsgamma.c 2008-11-25 04:06:04.000000000 -0500
-+++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsgamma.c 2009-03-26 15:13:30.000000000 -0400
++++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsgamma.c 2009-04-03 13:42:46.000000000 -0400
@@ -29,7 +29,7 @@
//
//
@@ -1771,7 +1771,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
if (cmsIsLinear(Table, nEntries)) return FALSE; // Nothing to do
diff -ruN openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmsgmt.c openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsgmt.c
--- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmsgmt.c 2008-11-25 04:06:04.000000000 -0500
-+++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsgmt.c 2009-03-26 15:13:30.000000000 -0400
++++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsgmt.c 2009-04-03 13:42:46.000000000 -0400
@@ -29,7 +29,7 @@
//
//
@@ -1875,7 +1875,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
diff -ruN openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmsintrp.c openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsintrp.c
--- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmsintrp.c 2008-11-25 04:06:04.000000000 -0500
-+++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsintrp.c 2009-03-26 15:13:30.000000000 -0400
++++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsintrp.c 2009-04-03 13:42:46.000000000 -0400
@@ -29,7 +29,7 @@
//
//
@@ -1914,7 +1914,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
diff -ruN openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio0.c openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio0.c
--- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio0.c 2008-11-25 04:06:04.000000000 -0500
-+++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio0.c 2009-03-26 15:13:30.000000000 -0400
++++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio0.c 2009-04-03 13:43:04.000000000 -0400
@@ -29,7 +29,7 @@
//
//
@@ -1993,7 +1993,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
{
FILEMEM* ResData = (FILEMEM*) Icc ->stream;
-@@ -147,19 +163,18 @@
+@@ -147,10 +163,10 @@
}
@@ -2006,32 +2006,19 @@ diff -ruN openjdkold/jdk/src/share/nativ
{
FILEMEM* ResData = (FILEMEM*) Icc ->stream;
- if (size == 0) return TRUE;
-
- if (ResData != NULL)
-- CopyMemory(ResData ->Block + ResData ->Pointer, Ptr, size);
-+ CopyMemory(ResData ->Block + Icc ->UsedSpace, Ptr, size);
-
-- ResData->Pointer += size;
- Icc->UsedSpace += size;
-
- return TRUE;
-@@ -167,27 +182,15 @@
+@@ -167,7 +183,7 @@
static
-BOOL MemoryGrow(struct _lcms_iccprofile_struct* Icc, size_t size)
--{
-- FILEMEM* ResData = (FILEMEM*) Icc->stream;
-- ResData->Size += size;
-- ResData->Block = realloc(ResData->Block, ResData->Size);
-- if (!ResData->Block)
-- return FALSE;
-- return TRUE;
--}
--
--
--static
++LCMSBOOL MemoryGrow(struct _lcms_iccprofile_struct* Icc, size_t size)
+ {
+ FILEMEM* ResData = (FILEMEM*) Icc->stream;
+ ResData->Size += size;
+@@ -179,15 +195,15 @@
+
+
+ static
-BOOL MemoryClose(struct _lcms_iccprofile_struct* Icc)
+LCMSBOOL MemoryClose(struct _lcms_iccprofile_struct* Icc)
{
@@ -2047,7 +2034,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
return 0;
}
-@@ -205,7 +208,7 @@
+@@ -205,7 +221,7 @@
{
size_t nReaded = fread(buffer, size, count, (FILE*) Icc->stream);
if (nReaded != count) {
@@ -2056,7 +2043,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
return 0;
}
-@@ -214,7 +217,7 @@
+@@ -214,7 +230,7 @@
static
@@ -2065,7 +2052,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
{
if (fseek((FILE*) Icc ->stream, (long) offset, SEEK_SET) != 0) {
-@@ -236,7 +239,7 @@
+@@ -236,7 +252,7 @@
static
@@ -2074,23 +2061,24 @@ diff -ruN openjdkold/jdk/src/share/nativ
{
if (size == 0) return TRUE;
-@@ -252,14 +255,7 @@
+@@ -252,14 +268,14 @@
static
-BOOL FileGrow(struct _lcms_iccprofile_struct* Icc, size_t size)
--{
-- return TRUE;
--}
--
--
--static
++LCMSBOOL FileGrow(struct _lcms_iccprofile_struct* Icc, size_t size)
+ {
+ return TRUE;
+ }
+
+
+ static
-BOOL FileClose(struct _lcms_iccprofile_struct* Icc)
+LCMSBOOL FileClose(struct _lcms_iccprofile_struct* Icc)
{
return fclose((FILE*) Icc ->stream);
}
-@@ -272,7 +268,7 @@
+@@ -272,7 +288,7 @@
cmsHPROFILE _cmsCreateProfilePlaceholder(void)
{
@@ -2099,7 +2087,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
if (Icc == NULL) return NULL;
// Empty values
-@@ -310,7 +306,7 @@
+@@ -310,7 +326,7 @@
// Search for a specific tag in tag dictionary
// Returns position or -1 if tag not found
@@ -2108,7 +2096,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
{
icInt32Number i;
-@@ -331,7 +327,7 @@
+@@ -331,7 +347,7 @@
// Check existance
@@ -2117,7 +2105,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
{
LPLCMSICCPROFILE Icc = (LPLCMSICCPROFILE) (LPSTR) hProfile;
return _cmsSearchTag(Icc, sig, FALSE) >= 0;
-@@ -350,7 +346,7 @@
+@@ -350,7 +366,7 @@
if (i >=0) {
@@ -2126,7 +2114,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
}
else {
-@@ -361,11 +357,14 @@
+@@ -361,11 +377,14 @@
cmsSignalError(LCMS_ERRC_ABORTED, "Too many tags (%d)", MAX_TABLE_TAG);
Icc ->TagCount = MAX_TABLE_TAG-1;
@@ -2142,7 +2130,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
CopyMemory(Ptr, Init, size);
Icc ->TagNames[i] = sig;
-@@ -396,13 +395,14 @@
+@@ -396,6 +415,8 @@
if (NewIcc == NULL) return NULL;
strncpy(NewIcc -> PhysicalFile, FileName, MAX_PATH-1);
@@ -2151,24 +2139,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
NewIcc ->stream = ICCfile;
NewIcc ->Read = FileRead;
- NewIcc ->Seek = FileSeek;
- NewIcc ->Tell = FileTell;
- NewIcc ->Close = FileClose;
-- NewIcc ->Grow = FileGrow;
- NewIcc ->Write = NULL;
-
- NewIcc ->IsWrite = FALSE;
-@@ -440,8 +440,7 @@
- NewIcc ->Seek = MemorySeek;
- NewIcc ->Tell = MemoryTell;
- NewIcc ->Close = MemoryClose;
-- NewIcc ->Grow = MemoryGrow;
-- NewIcc ->Write = MemoryWrite;
-+ NewIcc ->Write = NULL;
-
- NewIcc ->IsWrite = FALSE;
-
-@@ -498,7 +497,7 @@
+@@ -498,7 +519,7 @@
@@ -2177,7 +2148,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
{
LPLCMSICCPROFILE Icc = (LPLCMSICCPROFILE) hProfile;
*Dest = Icc -> MediaWhitePoint;
-@@ -506,14 +505,14 @@
+@@ -506,14 +527,14 @@
}
@@ -2194,7 +2165,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
{
LPLCMSICCPROFILE Icc = (LPLCMSICCPROFILE) hProfile;
*Dest = Icc -> Illuminant;
-@@ -571,7 +570,7 @@
+@@ -571,7 +592,7 @@
}
@@ -2203,7 +2174,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
{
LPLCMSICCPROFILE Icc = (LPLCMSICCPROFILE) (LPSTR) hProfile;
CopyMemory(Dest, &Icc ->Created, sizeof(struct tm));
-@@ -660,7 +659,7 @@
+@@ -660,7 +681,7 @@
// This is tricky, since LUT structs does have pointers
@@ -2212,7 +2183,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
{
LPLCMSICCPROFILE Icc = (LPLCMSICCPROFILE) (LPSTR) hProfile;
LPLUT Orig, Stored;
-@@ -688,7 +687,7 @@
+@@ -688,7 +709,7 @@
}
@@ -2221,7 +2192,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
{
LPLCMSICCPROFILE Icc = (LPLCMSICCPROFILE) (LPSTR) hProfile;
-@@ -697,7 +696,7 @@
+@@ -697,7 +718,7 @@
}
@@ -2230,7 +2201,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
{
LPLCMSICCPROFILE Icc = (LPLCMSICCPROFILE) (LPSTR) hProfile;
-@@ -705,7 +704,7 @@
+@@ -705,7 +726,7 @@
return TRUE;
}
@@ -2239,7 +2210,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
{
LPLCMSICCPROFILE Icc = (LPLCMSICCPROFILE) (LPSTR) hProfile;
-@@ -714,7 +713,7 @@
+@@ -714,7 +735,7 @@
}
@@ -2248,7 +2219,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
{
LPLCMSICCPROFILE Icc = (LPLCMSICCPROFILE) (LPSTR) hProfile;
-@@ -723,7 +722,7 @@
+@@ -723,7 +744,7 @@
}
@@ -2257,7 +2228,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
{
LPLCMSICCPROFILE Icc = (LPLCMSICCPROFILE) (LPSTR) hProfile;
-@@ -733,28 +732,40 @@
+@@ -733,28 +754,40 @@
}
@@ -2306,7 +2277,7 @@ diff -ruN openjdkold/jdk/src/share/nativ
+
diff -ruN openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio1.c openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio1.c
--- openjdkold/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio1.c 2008-11-25 04:06:04.000000000 -0500
-+++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio1.c 2009-03-26 15:13:30.000000000 -0400
++++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio1.c 2009-04-03 13:43:04.000000000 -0400
@@ -29,7 +29,7 @@
//
//
@@ -2874,10 +2845,10 @@ diff -ruN openjdkold/jdk/src/share/nativ
+ if (Curves[i] == NULL) goto Error;
SkipAlignment(Icc);
+ }
-+
+
+ // March-26'08: some V4 profiles may have different sampling
+ // rates, in this case resample all curves to maximum
-
++
+ for (i=1; i < nCurves; i++) {
+ if (Curves[i]->nEntries != Curves[0]->nEntries) {
+ ResampleCurves(Curves, nCurves);
@@ -4139,149 +4110,22 @@ diff -ruN openjdkold/jdk/src/share/nativ
// update BytesSaved so caller knows how many bytes put into stream
*BytesNeeded = Icc ->UsedSpace;
-@@ -3662,139 +3764,3 @@
+@@ -3662,10 +3764,10 @@
return FALSE;
}
-BOOL LCMSEXPORT _cmsModifyTagData(cmsHPROFILE hProfile, icTagSignature sig,
-- void *data, size_t size)
--{
++LCMSBOOL LCMSEXPORT _cmsModifyTagData(cmsHPROFILE hProfile, icTagSignature sig,
+ void *data, size_t size)
+ {
- BOOL isNew;
-- int i, idx, delta, count;
-- LPBYTE padChars[3] = {0, 0, 0};
-- LPBYTE beforeBuf, afterBuf, ptr;
-- size_t beforeSize, afterSize;
-- icUInt32Number profileSize, temp;
-- LPLCMSICCPROFILE Icc = (LPLCMSICCPROFILE) (LPSTR) hProfile;
--
-- isNew = FALSE;
-- idx = _cmsSearchTag(Icc, sig, FALSE);
-- if (idx < 0)
-- {
-- isNew = TRUE;
-- idx = Icc->TagCount++;
-- if (Icc->TagCount >= MAX_TABLE_TAG)
-- {
-- fprintf(stderr, "Too many tags (%d)\n", Icc->TagCount);
-- Icc->TagCount = MAX_TABLE_TAG-1;
-- return FALSE;
-- }
-- }
--
-- /* Read in size from header */
-- Icc->Seek(Icc, 0);
-- Icc->Read(&profileSize, sizeof(icUInt32Number), 1, Icc);
-- AdjustEndianess32((LPBYTE) &profileSize);
--
-- /* Compute the change in profile size */
-- if (isNew)
-- delta = sizeof(icTag) + ALIGNLONG(size);
-- else
-- delta = ALIGNLONG(size) - ALIGNLONG(Icc->TagSizes[idx]);
--
-- /* Add tag to internal structures */
-- ptr = malloc(size);
-- CopyMemory(ptr, data, size);
-- Icc->TagSizes[idx] = size;
-- Icc->TagNames[idx] = sig;
-- if (Icc->TagPtrs[idx])
-- free(Icc->TagPtrs[idx]);
-- Icc->TagPtrs[idx] = ptr;
-- if (isNew)
-- Icc->TagOffsets[idx] = profileSize;
--
-- /* Compute size of tag data before/after the modified tag */
-- beforeSize = Icc->TagOffsets[idx] - Icc->TagOffsets[0];
-- if (Icc->TagCount == (idx + 1))
-- afterSize = 0;
-- else
-- afterSize = profileSize - Icc->TagOffsets[idx+1];
--
-- /* Make copies of the data before/after the modified tag */
-- if (beforeSize > 0)
-- {
-- beforeBuf = malloc(beforeSize);
-- Icc->Seek(Icc, Icc->TagOffsets[0]);
-- Icc->Read(beforeBuf, beforeSize, 1, Icc);
-- }
--
-- if (afterSize > 0)
-- {
-- afterBuf = malloc(afterSize);
-- Icc->Seek(Icc, Icc->TagOffsets[idx+1]);
-- Icc->Read(afterBuf, afterSize, 1, Icc);
-- }
--
-- /* Update the profile size in the header */
-- profileSize += delta;
-- Icc->Seek(Icc, 0);
-- temp = TransportValue32(profileSize);
-- Icc->Write(Icc, sizeof(icUInt32Number), &temp);
--
-- Icc->Grow(Icc, delta);
--
-- /* Adjust tag offsets: if the tag is new, we must account
-- for the new tag table entry; otherwise, only those tags after
-- the modified tag are changed (by delta) */
-- if (isNew)
-- {
-- for (i = 0; i < Icc->TagCount; ++i)
-- Icc->TagOffsets[i] += sizeof(icTag);
-- }
-- else
-- {
-- for (i = idx+1; i < Icc->TagCount; ++i)
-- Icc->TagOffsets[i] += delta;
-- }
--
-- /* Write out a new tag table */
-- count = 0;
-- for (i = 0; i < Icc->TagCount; ++i)
-- {
-- if (Icc->TagNames[i] != 0)
-- ++count;
-- }
-- Icc->Seek(Icc, sizeof(icHeader));
-- temp = TransportValue32(count);
-- Icc->Write(Icc, sizeof(icUInt32Number), &temp);
--
-- for (i = 0; i < Icc->TagCount; ++i)
-- {
-- if (Icc->TagNames[i] != 0)
-- {
-- icTag tag;
More information about the distro-pkg-dev
mailing list