sun.java2d.cmm.ProfileDeferralMgr Java Examples

The following examples show how to use sun.java2d.cmm.ProfileDeferralMgr. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ICC_Profile.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns a byte array corresponding to the data of this ICC_Profile.
 * @return A byte array that contains the profile data.
 * @see #setData(int, byte[])
 */
public byte[] getData() {
int profileSize;
byte[] profileData;

    if (ProfileDeferralMgr.deferring) {
        ProfileDeferralMgr.activateProfiles();
    }

    PCMM mdl = CMSManager.getModule();

    /* get the number of bytes needed for this profile */
    profileSize = mdl.getProfileSize(cmmProfile);

    profileData = new byte [profileSize];

    /* get the data for the profile */
    mdl.getProfileData(cmmProfile, profileData);

    return profileData;
}
 
Example #2
Source File: ICC_Profile.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns a byte array corresponding to the data of this ICC_Profile.
 * @return A byte array that contains the profile data.
 * @see #setData(int, byte[])
 */
public byte[] getData() {
int profileSize;
byte[] profileData;

    if (ProfileDeferralMgr.deferring) {
        ProfileDeferralMgr.activateProfiles();
    }

    PCMM mdl = CMSManager.getModule();

    /* get the number of bytes needed for this profile */
    profileSize = mdl.getProfileSize(cmmProfile);

    profileData = new byte [profileSize];

    /* get the data for the profile */
    mdl.getProfileData(cmmProfile, profileData);

    return profileData;
}
 
Example #3
Source File: ICC_Profile.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns a byte array corresponding to the data of this ICC_Profile.
 * @return A byte array that contains the profile data.
 * @see #setData(int, byte[])
 */
public byte[] getData() {
int profileSize;
byte[] profileData;

    if (ProfileDeferralMgr.deferring) {
        ProfileDeferralMgr.activateProfiles();
    }

    PCMM mdl = CMSManager.getModule();

    /* get the number of bytes needed for this profile */
    profileSize = mdl.getProfileSize(cmmProfile);

    profileData = new byte [profileSize];

    /* get the data for the profile */
    mdl.getProfileData(cmmProfile, profileData);

    return profileData;
}
 
Example #4
Source File: ICC_Profile.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns a byte array corresponding to the data of this ICC_Profile.
 * @return A byte array that contains the profile data.
 * @see #setData(int, byte[])
 */
public byte[] getData() {
int profileSize;
byte[] profileData;

    if (ProfileDeferralMgr.deferring) {
        ProfileDeferralMgr.activateProfiles();
    }

    PCMM mdl = CMSManager.getModule();

    /* get the number of bytes needed for this profile */
    profileSize = mdl.getProfileSize(cmmProfile);

    profileData = new byte [profileSize];

    /* get the data for the profile */
    mdl.getProfileData(cmmProfile, profileData);

    return profileData;
}
 
Example #5
Source File: ICC_Profile.java    From Java8CN with Apache License 2.0 6 votes vote down vote up
/**
 * Returns a byte array corresponding to the data of this ICC_Profile.
 * @return A byte array that contains the profile data.
 * @see #setData(int, byte[])
 */
public byte[] getData() {
int profileSize;
byte[] profileData;

    if (ProfileDeferralMgr.deferring) {
        ProfileDeferralMgr.activateProfiles();
    }

    PCMM mdl = CMSManager.getModule();

    /* get the number of bytes needed for this profile */
    profileSize = mdl.getProfileSize(cmmProfile);

    profileData = new byte [profileSize];

    /* get the data for the profile */
    mdl.getProfileData(cmmProfile, profileData);

    return profileData;
}
 
Example #6
Source File: ICC_Profile.java    From jdk-1.7-annotated with Apache License 2.0 6 votes vote down vote up
/**
 * Returns a byte array corresponding to the data of this ICC_Profile.
 * @return A byte array that contains the profile data.
 * @see #setData(int, byte[])
 */
public byte[] getData() {
int profileSize;
byte[] profileData;

    if (ProfileDeferralMgr.deferring) {
        ProfileDeferralMgr.activateProfiles();
    }

    PCMM mdl = CMSManager.getModule();

    /* get the number of bytes needed for this profile */
    profileSize = mdl.getProfileSize(ID);

    profileData = new byte [profileSize];

    /* get the data for the profile */
    mdl.getProfileData(ID, profileData);

    return profileData;
}
 
Example #7
Source File: ICC_Profile.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns a byte array corresponding to the data of this ICC_Profile.
 * @return A byte array that contains the profile data.
 * @see #setData(int, byte[])
 */
public byte[] getData() {
int profileSize;
byte[] profileData;

    if (ProfileDeferralMgr.deferring) {
        ProfileDeferralMgr.activateProfiles();
    }

    PCMM mdl = CMSManager.getModule();

    /* get the number of bytes needed for this profile */
    profileSize = mdl.getProfileSize(cmmProfile);

    profileData = new byte [profileSize];

    /* get the data for the profile */
    mdl.getProfileData(cmmProfile, profileData);

    return profileData;
}
 
Example #8
Source File: ICC_Profile.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * Returns a byte array corresponding to the data of this ICC_Profile.
 * @return A byte array that contains the profile data.
 * @see #setData(int, byte[])
 */
public byte[] getData() {
int profileSize;
byte[] profileData;

    if (ProfileDeferralMgr.deferring) {
        ProfileDeferralMgr.activateProfiles();
    }

    PCMM mdl = CMSManager.getModule();

    /* get the number of bytes needed for this profile */
    profileSize = mdl.getProfileSize(cmmProfile);

    profileData = new byte [profileSize];

    /* get the data for the profile */
    mdl.getProfileData(cmmProfile, profileData);

    return profileData;
}
 
Example #9
Source File: ICC_Profile.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/**
 * Returns a byte array corresponding to the data of this
 * {@code ICC_Profile}.
 *
 * @return a byte array that contains the profile data
 * @see #setData(int, byte[])
 */
public byte[] getData() {
int profileSize;
byte[] profileData;

    if (ProfileDeferralMgr.deferring) {
        ProfileDeferralMgr.activateProfiles();
    }

    PCMM mdl = CMSManager.getModule();

    /* get the number of bytes needed for this profile */
    profileSize = mdl.getProfileSize(cmmProfile);

    profileData = new byte [profileSize];

    /* get the data for the profile */
    mdl.getProfileData(cmmProfile, profileData);

    return profileData;
}
 
Example #10
Source File: ICC_Profile.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns a byte array corresponding to the data of this ICC_Profile.
 * @return A byte array that contains the profile data.
 * @see #setData(int, byte[])
 */
public byte[] getData() {
int profileSize;
byte[] profileData;

    if (ProfileDeferralMgr.deferring) {
        ProfileDeferralMgr.activateProfiles();
    }

    PCMM mdl = CMSManager.getModule();

    /* get the number of bytes needed for this profile */
    profileSize = mdl.getProfileSize(cmmProfile);

    profileData = new byte [profileSize];

    /* get the data for the profile */
    mdl.getProfileData(cmmProfile, profileData);

    return profileData;
}
 
Example #11
Source File: ICC_Profile.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns a byte array corresponding to the data of this ICC_Profile.
 * @return A byte array that contains the profile data.
 * @see #setData(int, byte[])
 */
public byte[] getData() {
int profileSize;
byte[] profileData;

    if (ProfileDeferralMgr.deferring) {
        ProfileDeferralMgr.activateProfiles();
    }

    PCMM mdl = CMSManager.getModule();

    /* get the number of bytes needed for this profile */
    profileSize = mdl.getProfileSize(cmmProfile);

    profileData = new byte [profileSize];

    /* get the data for the profile */
    mdl.getProfileData(cmmProfile, profileData);

    return profileData;
}
 
Example #12
Source File: ICC_Profile.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Constructs an ICC_Profile for which the actual loading of the
 * profile data from a file and the initialization of the CMM should
 * be deferred as long as possible.
 * Deferral is only used for standard profiles.
 * If deferring is disabled, then getStandardProfile() ensures
 * that all of the appropriate access privileges are granted
 * when loading this profile.
 * If deferring is enabled, then the deferred activation
 * code will take care of access privileges.
 * @see activateDeferredProfile()
 */
static ICC_Profile getDeferredInstance(ProfileDeferralInfo pdi) {
    if (!ProfileDeferralMgr.deferring) {
        return getStandardProfile(pdi.filename);
    }
    if (pdi.colorSpaceType == ColorSpace.TYPE_RGB) {
        return new ICC_ProfileRGB(pdi);
    } else if (pdi.colorSpaceType == ColorSpace.TYPE_GRAY) {
        return new ICC_ProfileGray(pdi);
    } else {
        return new ICC_Profile(pdi);
    }
}
 
Example #13
Source File: ICC_Profile.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs an ICC_Profile object whose loading will be deferred.
 * The ID will be 0 until the profile is loaded.
 */
ICC_Profile(ProfileDeferralInfo pdi) {
    this.deferralInfo = pdi;
    this.profileActivator = new ProfileActivator() {
        public void activate() throws ProfileDataException {
            activateDeferredProfile();
        }
    };
    ProfileDeferralMgr.registerDeferral(this.profileActivator);
}
 
Example #14
Source File: ICC_Profile.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs an ICC_Profile object whose loading will be deferred.
 * The ID will be 0 until the profile is loaded.
 */
ICC_Profile(ProfileDeferralInfo pdi) {
    this.deferralInfo = pdi;
    this.profileActivator = new ProfileActivator() {
        public void activate() throws ProfileDataException {
            activateDeferredProfile();
        }
    };
    ProfileDeferralMgr.registerDeferral(this.profileActivator);
}
 
Example #15
Source File: ICC_Profile.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs an ICC_Profile for which the actual loading of the
 * profile data from a file and the initialization of the CMM should
 * be deferred as long as possible.
 * Deferral is only used for standard profiles.
 * If deferring is disabled, then getStandardProfile() ensures
 * that all of the appropriate access privileges are granted
 * when loading this profile.
 * If deferring is enabled, then the deferred activation
 * code will take care of access privileges.
 * @see activateDeferredProfile()
 */
static ICC_Profile getDeferredInstance(ProfileDeferralInfo pdi) {
    if (!ProfileDeferralMgr.deferring) {
        return getStandardProfile(pdi.filename);
    }
    if (pdi.colorSpaceType == ColorSpace.TYPE_RGB) {
        return new ICC_ProfileRGB(pdi);
    } else if (pdi.colorSpaceType == ColorSpace.TYPE_GRAY) {
        return new ICC_ProfileGray(pdi);
    } else {
        return new ICC_Profile(pdi);
    }
}
 
Example #16
Source File: ICC_Profile.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Frees the resources associated with an ICC_Profile object.
 */
protected void finalize () {
    if (cmmProfile != null) {
        CMSManager.getModule().freeProfile(cmmProfile);
    } else if (profileActivator != null) {
        ProfileDeferralMgr.unregisterDeferral(profileActivator);
    }
}
 
Example #17
Source File: ICC_Profile.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Frees the resources associated with an ICC_Profile object.
 */
protected void finalize () {
    if (cmmProfile != null) {
        CMSManager.getModule().freeProfile(cmmProfile);
    } else if (profileActivator != null) {
        ProfileDeferralMgr.unregisterDeferral(profileActivator);
    }
}
 
Example #18
Source File: ICC_Profile.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs an ICC_Profile for which the actual loading of the
 * profile data from a file and the initialization of the CMM should
 * be deferred as long as possible.
 * Deferral is only used for standard profiles.
 * If deferring is disabled, then getStandardProfile() ensures
 * that all of the appropriate access privileges are granted
 * when loading this profile.
 * If deferring is enabled, then the deferred activation
 * code will take care of access privileges.
 * @see #activateDeferredProfile()
 */
static ICC_Profile getDeferredInstance(ProfileDeferralInfo pdi) {
    if (!ProfileDeferralMgr.deferring) {
        return getStandardProfile(pdi.filename);
    }
    if (pdi.colorSpaceType == ColorSpace.TYPE_RGB) {
        return new ICC_ProfileRGB(pdi);
    } else if (pdi.colorSpaceType == ColorSpace.TYPE_GRAY) {
        return new ICC_ProfileGray(pdi);
    } else {
        return new ICC_Profile(pdi);
    }
}
 
Example #19
Source File: ICC_Profile.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Frees the resources associated with an ICC_Profile object.
 */
protected void finalize () {
    if (cmmProfile != null) {
        CMSManager.getModule().freeProfile(cmmProfile);
    } else if (profileActivator != null) {
        ProfileDeferralMgr.unregisterDeferral(profileActivator);
    }
}
 
Example #20
Source File: ICC_Profile.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs an ICC_Profile object whose loading will be deferred.
 * The ID will be 0 until the profile is loaded.
 */
ICC_Profile(ProfileDeferralInfo pdi) {
    this.deferralInfo = pdi;
    this.profileActivator = new ProfileActivator() {
        public void activate() throws ProfileDataException {
            activateDeferredProfile();
        }
    };
    ProfileDeferralMgr.registerDeferral(this.profileActivator);
}
 
Example #21
Source File: ICC_Profile.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Frees the resources associated with an ICC_Profile object.
 */
protected void finalize () {
    if (cmmProfile != null) {
        CMSManager.getModule().freeProfile(cmmProfile);
    } else if (profileActivator != null) {
        ProfileDeferralMgr.unregisterDeferral(profileActivator);
    }
}
 
Example #22
Source File: ICC_Profile.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs an ICC_Profile for which the actual loading of the
 * profile data from a file and the initialization of the CMM should
 * be deferred as long as possible.
 * Deferral is only used for standard profiles.
 * If deferring is disabled, then getStandardProfile() ensures
 * that all of the appropriate access privileges are granted
 * when loading this profile.
 * If deferring is enabled, then the deferred activation
 * code will take care of access privileges.
 * @see activateDeferredProfile()
 */
static ICC_Profile getDeferredInstance(ProfileDeferralInfo pdi) {
    if (!ProfileDeferralMgr.deferring) {
        return getStandardProfile(pdi.filename);
    }
    if (pdi.colorSpaceType == ColorSpace.TYPE_RGB) {
        return new ICC_ProfileRGB(pdi);
    } else if (pdi.colorSpaceType == ColorSpace.TYPE_GRAY) {
        return new ICC_ProfileGray(pdi);
    } else {
        return new ICC_Profile(pdi);
    }
}
 
Example #23
Source File: ICC_Profile.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs an ICC_Profile object whose loading will be deferred.
 * The ID will be 0 until the profile is loaded.
 */
ICC_Profile(ProfileDeferralInfo pdi) {
    this.deferralInfo = pdi;
    this.profileActivator = new ProfileActivator() {
        public void activate() throws ProfileDataException {
            activateDeferredProfile();
        }
    };
    ProfileDeferralMgr.registerDeferral(this.profileActivator);
}
 
Example #24
Source File: ICC_Profile.java    From jdk-1.7-annotated with Apache License 2.0 5 votes vote down vote up
/**
 * Frees the resources associated with an ICC_Profile object.
 */
protected void finalize () {
    if (ID != 0) {
        CMSManager.getModule().freeProfile(ID);
    } else if (profileActivator != null) {
        ProfileDeferralMgr.unregisterDeferral(profileActivator);
    }
}
 
Example #25
Source File: ICC_Profile.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs an ICC_Profile for which the actual loading of the
 * profile data from a file and the initialization of the CMM should
 * be deferred as long as possible.
 * Deferral is only used for standard profiles.
 * If deferring is disabled, then getStandardProfile() ensures
 * that all of the appropriate access privileges are granted
 * when loading this profile.
 * If deferring is enabled, then the deferred activation
 * code will take care of access privileges.
 * @see activateDeferredProfile()
 */
static ICC_Profile getDeferredInstance(ProfileDeferralInfo pdi) {
    if (!ProfileDeferralMgr.deferring) {
        return getStandardProfile(pdi.filename);
    }
    if (pdi.colorSpaceType == ColorSpace.TYPE_RGB) {
        return new ICC_ProfileRGB(pdi);
    } else if (pdi.colorSpaceType == ColorSpace.TYPE_GRAY) {
        return new ICC_ProfileGray(pdi);
    } else {
        return new ICC_Profile(pdi);
    }
}
 
Example #26
Source File: ICC_Profile.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Constructs an {@code ICC_Profile} object whose loading will be deferred.
 * The ID will be 0 until the profile is loaded.
 */
ICC_Profile(ProfileDeferralInfo pdi) {
    this.deferralInfo = pdi;
    this.profileActivator = new ProfileActivator() {
        public void activate() throws ProfileDataException {
            activateDeferredProfile();
        }
    };
    ProfileDeferralMgr.registerDeferral(this.profileActivator);
}
 
Example #27
Source File: ICC_Profile.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Constructs an {@code ICC_Profile} for which the actual loading of the
 * profile data from a file and the initialization of the CMM should be
 * deferred as long as possible. Deferral is only used for standard
 * profiles. If deferring is disabled, then getStandardProfile() ensures
 * that all of the appropriate access privileges are granted when loading
 * this profile. If deferring is enabled, then the deferred activation code
 * will take care of access privileges.
 *
 * @see #activateDeferredProfile()
 */
static ICC_Profile getDeferredInstance(ProfileDeferralInfo pdi) {
    if (!ProfileDeferralMgr.deferring) {
        return getStandardProfile(pdi.filename);
    }
    if (pdi.colorSpaceType == ColorSpace.TYPE_RGB) {
        return new ICC_ProfileRGB(pdi);
    } else if (pdi.colorSpaceType == ColorSpace.TYPE_GRAY) {
        return new ICC_ProfileGray(pdi);
    } else {
        return new ICC_Profile(pdi);
    }
}
 
Example #28
Source File: ICC_Profile.java    From jdk-1.7-annotated with Apache License 2.0 5 votes vote down vote up
/**
 * Constructs an ICC_Profile for which the actual loading of the
 * profile data from a file and the initialization of the CMM should
 * be deferred as long as possible.
 * Deferral is only used for standard profiles.
 * If deferring is disabled, then getStandardProfile() ensures
 * that all of the appropriate access privileges are granted
 * when loading this profile.
 * If deferring is enabled, then the deferred activation
 * code will take care of access privileges.
 * @see activateDeferredProfile()
 */
static ICC_Profile getDeferredInstance(ProfileDeferralInfo pdi) {
    if (!ProfileDeferralMgr.deferring) {
        return getStandardProfile(pdi.filename);
    }
    if (pdi.colorSpaceType == ColorSpace.TYPE_RGB) {
        return new ICC_ProfileRGB(pdi);
    } else if (pdi.colorSpaceType == ColorSpace.TYPE_GRAY) {
        return new ICC_ProfileGray(pdi);
    } else {
        return new ICC_Profile(pdi);
    }
}
 
Example #29
Source File: ICC_Profile.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs an ICC_Profile for which the actual loading of the
 * profile data from a file and the initialization of the CMM should
 * be deferred as long as possible.
 * Deferral is only used for standard profiles.
 * If deferring is disabled, then getStandardProfile() ensures
 * that all of the appropriate access privileges are granted
 * when loading this profile.
 * If deferring is enabled, then the deferred activation
 * code will take care of access privileges.
 * @see activateDeferredProfile()
 */
static ICC_Profile getDeferredInstance(ProfileDeferralInfo pdi) {
    if (!ProfileDeferralMgr.deferring) {
        return getStandardProfile(pdi.filename);
    }
    if (pdi.colorSpaceType == ColorSpace.TYPE_RGB) {
        return new ICC_ProfileRGB(pdi);
    } else if (pdi.colorSpaceType == ColorSpace.TYPE_GRAY) {
        return new ICC_ProfileGray(pdi);
    } else {
        return new ICC_Profile(pdi);
    }
}
 
Example #30
Source File: ICC_Profile.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructs an ICC_Profile object whose loading will be deferred.
 * The ID will be 0 until the profile is loaded.
 */
ICC_Profile(ProfileDeferralInfo pdi) {
    this.deferralInfo = pdi;
    this.profileActivator = new ProfileActivator() {
        public void activate() throws ProfileDataException {
            activateDeferredProfile();
        }
    };
    ProfileDeferralMgr.registerDeferral(this.profileActivator);
}