Skip to content

Commit 9a4bc2d

Browse files
Ekaterina Vergizovagnu-andrew
authored andcommitted
8297088: Update LCMS to 2.14
Reviewed-by: abakhtin, andrew Backport-of: 01b213899cb8124860441fa26c9652b4a4bff896
1 parent 9948bd6 commit 9a4bc2d

31 files changed

+2000
-592
lines changed

THIRD_PARTY_README

Lines changed: 94 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,31 +1725,108 @@ THE SOFTWARE.
17251725

17261726
-------------------------------------------------------------------------------
17271727

1728-
%% This notice is provided with respect to Little CMS 2.12, which may be
1728+
%% This notice is provided with respect to Little CMS 2.14, which may be
17291729
included with JRE 8, JDK 8, and OpenJDK 8.
17301730

17311731
--- begin of LICENSE ---
17321732

1733+
README.1ST file information
1734+
1735+
LittleCMS core is released under MIT License
1736+
1737+
---------------------------------
1738+
17331739
Little CMS
1734-
Copyright (c) 1998-2020 Marti Maria Saguer
1740+
Copyright (c) 1998-2022 Marti Maria Saguer
17351741

1736-
Permission is hereby granted, free of charge, to any person obtaining a copy
1737-
of this software and associated documentation files (the "Software"), to deal
1738-
in the Software without restriction, including without limitation the rights
1739-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1740-
copies of the Software, and to permit persons to whom the Software is
1741-
furnished to do so, subject to the following conditions:
1742+
Permission is hereby granted, free of charge, to any person obtaining
1743+
a copy of this software and associated documentation files (the
1744+
"Software"), to deal in the Software without restriction, including
1745+
without limitation the rights to use, copy, modify, merge, publish,
1746+
distribute, sublicense, and/or sell copies of the Software, and to
1747+
permit persons to whom the Software is furnished to do so, subject
1748+
to the following conditions:
1749+
1750+
The above copyright notice and this permission notice shall be
1751+
included in all copies or substantial portions of the Software.
1752+
1753+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1754+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1755+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1756+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
1757+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
1758+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
1759+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17421760

1743-
The above copyright notice and this permission notice shall be included in all
1744-
copies or substantial portions of the Software.
1761+
---------------------------------
1762+
1763+
The below license applies to the following files:
1764+
liblcms/cmssm.c
1765+
1766+
Copyright 2001, softSurfer (www.softsurfer.com)
1767+
1768+
This code may be freely used and modified for any purpose
1769+
providing that this copyright notice is included with it.
1770+
SoftSurfer makes no warranty for this code, and cannot be held
1771+
liable for any real or imagined damage resulting from its use.
1772+
Users of this code must verify correctness for their application.
1773+
1774+
1775+
AUTHORS File Information:
1776+
1777+
Main Author
1778+
------------
1779+
Marti Maria
1780+
1781+
1782+
Contributors
1783+
------------
1784+
Bob Friesenhahn
1785+
Kai-Uwe Behrmann
1786+
Stuart Nixon
1787+
Jordi Vilar
1788+
Richard Hughes
1789+
Auke Nauta
1790+
Chris Evans (Google)
1791+
Lorenzo Ridolfi
1792+
Robin Watts (Artifex)
1793+
Shawn Pedersen
1794+
Andrew Brygin
1795+
Samuli Suominen
1796+
Florian Hˆch
1797+
Aurelien Jarno
1798+
Claudiu Cebuc
1799+
Michael Vhrel (Artifex)
1800+
Michal Cihar
1801+
Daniel Kaneider
1802+
Mateusz Jurczyk (Google)
1803+
Paul Miller
1804+
SÈbastien LÈon
1805+
Christian Schmitz
1806+
XhmikosR
1807+
Stanislav Brabec (SuSe)
1808+
Leonhard Gruenschloss (Google)
1809+
Patrick Noffke
1810+
Christopher James Halse Rogers
1811+
John Hein
1812+
Thomas Weber (Debian)
1813+
Mark Allen
1814+
Noel Carboni
1815+
Sergei Trofimovic
1816+
Philipp Knechtges
1817+
1818+
Special Thanks
1819+
--------------
1820+
Artifex software
1821+
AlienSkin software
1822+
Jan Morovic
1823+
Jos Vernon (WebSupergoo)
1824+
Harald Schneider (Maxon)
1825+
Christian Albrecht
1826+
Dimitrios Anastassakis
1827+
Lemke Software
1828+
Tim Zaman
17451829

1746-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1747-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1748-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1749-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1750-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1751-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1752-
SOFTWARE.
17531830

17541831
--- end of LICENSE ---
17551832

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Tips and tasks when updating LittleCMS sources to a newer version.
2+
3+
Download and unzip latest release from https://sourceforge.net/projects/lcms/files/
4+
Replace files in jdk/src/share/native/sun/java2d/cmm/lcms with files from unzipped src and include folders
5+
Replace is important because the lcms sources here are just the subset needed by JDK.
6+
This is deliberate, so when updating be sure to import only the same files.
7+
If a file has been removed from upstream you will notice it during the copy.
8+
It should then be removed from the JDK sources.
9+
If a new file is needed then the build will fail. Manually copy that in.
10+
11+
Some re-editing of these updated files will be needed.
12+
Use "expand" and "sed" to remove tabs and trailing white space from the imported files.
13+
Re-apply the GPL headers used by the JDK. If done correctly these should then not
14+
show up in the PR diff.
15+
16+
Update THIRD_PARTY_README per the current license/copyrights/attributions etc.
17+
18+
Build on all platforms.
19+
If there are compiler warnings causing build failures, update the disabled warnings in
20+
jdk/make/lib/Awt2dLibraries.gmk
21+
Run all automated client tests on all platforms.
22+
Also run J2Ddemo and pay particular attention to the "color" tab.
23+
Visually verify the color transforms against the same with the current/previous JDK

jdk/src/share/native/sun/java2d/cmm/lcms/cmsalpha.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
//---------------------------------------------------------------------------------
3131
//
3232
// Little Color Management System
33-
// Copyright (c) 1998-2020 Marti Maria Saguer
33+
// Copyright (c) 1998-2022 Marti Maria Saguer
3434
//
3535
// Permission is hereby granted, free of charge, to any person obtaining
3636
// a copy of this software and associated documentation files (the "Software"),
@@ -220,21 +220,21 @@ static
220220
void fromFLTto8(void* dst, const void* src)
221221
{
222222
cmsFloat32Number n = *(cmsFloat32Number*)src;
223-
*(cmsUInt8Number*)dst = _cmsQuickSaturateByte(n * 255.0f);
223+
*(cmsUInt8Number*)dst = _cmsQuickSaturateByte(n * 255.0);
224224
}
225225

226226
static
227227
void fromFLTto16(void* dst, const void* src)
228228
{
229229
cmsFloat32Number n = *(cmsFloat32Number*)src;
230-
*(cmsUInt16Number*)dst = _cmsQuickSaturateWord(n * 65535.0f);
230+
*(cmsUInt16Number*)dst = _cmsQuickSaturateWord(n * 65535.0);
231231
}
232232

233233
static
234234
void fromFLTto16SE(void* dst, const void* src)
235235
{
236236
cmsFloat32Number n = *(cmsFloat32Number*)src;
237-
cmsUInt16Number i = _cmsQuickSaturateWord(n * 65535.0f);
237+
cmsUInt16Number i = _cmsQuickSaturateWord(n * 65535.0);
238238

239239
*(cmsUInt16Number*)dst = CHANGE_ENDIAN(i);
240240
}
@@ -272,7 +272,7 @@ void fromHLFto8(void* dst, const void* src)
272272
{
273273
#ifndef CMS_NO_HALF_SUPPORT
274274
cmsFloat32Number n = _cmsHalf2Float(*(cmsUInt16Number*)src);
275-
*(cmsUInt8Number*)dst = _cmsQuickSaturateByte(n * 255.0f);
275+
*(cmsUInt8Number*)dst = _cmsQuickSaturateByte(n * 255.0);
276276
#else
277277
cmsUNUSED_PARAMETER(dst);
278278
cmsUNUSED_PARAMETER(src);
@@ -285,7 +285,7 @@ void fromHLFto16(void* dst, const void* src)
285285
{
286286
#ifndef CMS_NO_HALF_SUPPORT
287287
cmsFloat32Number n = _cmsHalf2Float(*(cmsUInt16Number*)src);
288-
*(cmsUInt16Number*)dst = _cmsQuickSaturateWord(n * 65535.0f);
288+
*(cmsUInt16Number*)dst = _cmsQuickSaturateWord(n * 65535.0);
289289
#else
290290
cmsUNUSED_PARAMETER(dst);
291291
cmsUNUSED_PARAMETER(src);
@@ -297,7 +297,7 @@ void fromHLFto16SE(void* dst, const void* src)
297297
{
298298
#ifndef CMS_NO_HALF_SUPPORT
299299
cmsFloat32Number n = _cmsHalf2Float(*(cmsUInt16Number*)src);
300-
cmsUInt16Number i = _cmsQuickSaturateWord(n * 65535.0f);
300+
cmsUInt16Number i = _cmsQuickSaturateWord(n * 65535.0);
301301
*(cmsUInt16Number*)dst = CHANGE_ENDIAN(i);
302302
#else
303303
cmsUNUSED_PARAMETER(dst);
@@ -443,9 +443,9 @@ void ComputeIncrementsForChunky(cmsUInt32Number Format,
443443
cmsUInt32Number channelSize = trueBytesSize(Format);
444444
cmsUInt32Number pixelSize = channelSize * total_chans;
445445

446-
// Sanity check
447-
if (total_chans <= 0 || total_chans >= cmsMAXCHANNELS)
448-
return;
446+
// Sanity check
447+
if (total_chans <= 0 || total_chans >= cmsMAXCHANNELS)
448+
return;
449449

450450
memset(channels, 0, sizeof(channels));
451451

jdk/src/share/native/sun/java2d/cmm/lcms/cmscam02.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
//---------------------------------------------------------------------------------
3131
//
3232
// Little Color Management System
33-
// Copyright (c) 1998-2020 Marti Maria Saguer
33+
// Copyright (c) 1998-2022 Marti Maria Saguer
3434
//
3535
// Permission is hereby granted, free of charge, to any person obtaining
3636
// a copy of this software and associated documentation files (the "Software"),

0 commit comments

Comments
 (0)