8254863: Delete code leftover from old fixes
Reviewed-by: azeemj, kizune, prr
This commit is contained in:
parent
8066b33c40
commit
b5d78afe20
@ -831,8 +831,6 @@ public class ICC_Profile implements Serializable {
|
||||
*/
|
||||
public static ICC_Profile getInstance (int cspace) {
|
||||
ICC_Profile thisProfile = null;
|
||||
String fileName;
|
||||
|
||||
switch (cspace) {
|
||||
case ColorSpace.CS_sRGB:
|
||||
synchronized(ICC_Profile.class) {
|
||||
@ -870,17 +868,11 @@ public class ICC_Profile implements Serializable {
|
||||
case ColorSpace.CS_PYCC:
|
||||
synchronized(ICC_Profile.class) {
|
||||
if (PYCCprofile == null) {
|
||||
if (standardProfileExists("PYCC.pf"))
|
||||
{
|
||||
ProfileDeferralInfo pInfo =
|
||||
new ProfileDeferralInfo("PYCC.pf",
|
||||
ColorSpace.TYPE_3CLR, 3,
|
||||
CLASS_DISPLAY);
|
||||
PYCCprofile = getDeferredInstance(pInfo);
|
||||
} else {
|
||||
throw new IllegalArgumentException(
|
||||
"Can't load standard profile: PYCC.pf");
|
||||
}
|
||||
ProfileDeferralInfo pInfo =
|
||||
new ProfileDeferralInfo("PYCC.pf",
|
||||
ColorSpace.TYPE_3CLR, 3,
|
||||
CLASS_DISPLAY);
|
||||
PYCCprofile = getDeferredInstance(pInfo);
|
||||
}
|
||||
thisProfile = PYCCprofile;
|
||||
}
|
||||
@ -1851,17 +1843,6 @@ public class ICC_Profile implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether built-in profile specified by fileName exists.
|
||||
*/
|
||||
private static boolean standardProfileExists(final String fileName) {
|
||||
return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
|
||||
public Boolean run() {
|
||||
return PCMM.class.getResource("profiles/"+fileName) != null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* Serialization support.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2020, 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
|
||||
@ -25,14 +25,11 @@
|
||||
|
||||
package sun.java2d.cmm;
|
||||
|
||||
import java.awt.color.CMMException;
|
||||
import java.awt.color.ColorSpace;
|
||||
import java.awt.color.ICC_Profile;
|
||||
import java.awt.color.CMMException;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.awt.image.Raster;
|
||||
import java.awt.image.WritableRaster;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
|
||||
import sun.security.action.GetPropertyAction;
|
||||
|
||||
public class CMSManager {
|
||||
@ -103,11 +100,6 @@ public class CMSManager {
|
||||
return p;
|
||||
}
|
||||
|
||||
public void freeProfile(Profile p) {
|
||||
System.err.printf(cName + ".freeProfile(ID=%s)\n", p.toString());
|
||||
tcmm.freeProfile(p);
|
||||
}
|
||||
|
||||
public int getProfileSize(Profile p) {
|
||||
System.err.print(cName + ".getProfileSize(ID=" + p + ")");
|
||||
int size = tcmm.getProfileSize(p);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2020, 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
|
||||
@ -33,7 +33,6 @@ public interface PCMM {
|
||||
|
||||
/* methods invoked from ICC_Profile */
|
||||
public Profile loadProfile(byte[] data);
|
||||
public void freeProfile(Profile p);
|
||||
public int getProfileSize(Profile p);
|
||||
public void getProfileData(Profile p, byte[] data);
|
||||
public void getTagData(Profile p, int tagSignature, byte[] data);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2020, 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
|
||||
@ -59,23 +59,6 @@ public class ProfileDeferralMgr {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Removes a ProfileActivator object from the vector of ProfileActivator
|
||||
* objects whose activate method will be called if the CMM needs to be
|
||||
* activated.
|
||||
*/
|
||||
public static void unregisterDeferral(ProfileActivator pa) {
|
||||
|
||||
if (!deferring) {
|
||||
return;
|
||||
}
|
||||
if (aVector == null) {
|
||||
return;
|
||||
}
|
||||
aVector.removeElement(pa);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a ProfileActivator object from the vector of ProfileActivator
|
||||
* objects whose activate method will be called if the CMM needs to be
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2020, 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
|
||||
@ -27,6 +27,7 @@ package sun.java2d.cmm.lcms;
|
||||
|
||||
import java.awt.color.CMMException;
|
||||
import java.awt.color.ICC_Profile;
|
||||
|
||||
import sun.java2d.cmm.ColorTransform;
|
||||
import sun.java2d.cmm.PCMM;
|
||||
import sun.java2d.cmm.Profile;
|
||||
@ -56,12 +57,6 @@ public class LCMS implements PCMM {
|
||||
throw new CMMException("Invalid profile: " + p);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void freeProfile(Profile p) {
|
||||
// we use disposer, so this method does nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getProfileSize(final Profile p) {
|
||||
synchronized (p) {
|
||||
|
Loading…
Reference in New Issue
Block a user