src/share/classes/sun/java2d/cmm/lcms/LCMSProfile.java

Print this page




  26 package sun.java2d.cmm.lcms;
  27 
  28 import java.awt.color.CMMException;
  29 import java.util.Arrays;
  30 import java.util.HashMap;
  31 import sun.java2d.cmm.Profile;
  32 
  33 final class LCMSProfile extends Profile {
  34     private final TagCache tagCache;
  35 
  36     private final Object disposerReferent;
  37 
  38     LCMSProfile(long ptr, Object ref) {
  39         super(ptr);
  40 
  41         disposerReferent = ref;
  42 
  43         tagCache = new TagCache(this);
  44     }
  45 
  46     final long getLcmsPtr() {
  47         return this.getNativePtr();
  48     }
  49 
  50     TagData getTag(int sig) {
  51         return tagCache.getTag(sig);
  52     }
  53 
  54     void clearTagCache() {
  55         tagCache.clear();
  56     }
  57 
  58     static class TagCache  {
  59         final LCMSProfile profile;
  60         private HashMap<Integer, TagData> tags;
  61 
  62         TagCache(LCMSProfile p) {
  63             profile = p;
  64             tags = new HashMap<>();
  65         }
  66 




  26 package sun.java2d.cmm.lcms;
  27 
  28 import java.awt.color.CMMException;
  29 import java.util.Arrays;
  30 import java.util.HashMap;
  31 import sun.java2d.cmm.Profile;
  32 
  33 final class LCMSProfile extends Profile {
  34     private final TagCache tagCache;
  35 
  36     private final Object disposerReferent;
  37 
  38     LCMSProfile(long ptr, Object ref) {
  39         super(ptr);
  40 
  41         disposerReferent = ref;
  42 
  43         tagCache = new TagCache(this);
  44     }
  45 
  46     long getLcmsPtr() {
  47         return this.getNativePtr();
  48     }
  49 
  50     TagData getTag(int sig) {
  51         return tagCache.getTag(sig);
  52     }
  53 
  54     void clearTagCache() {
  55         tagCache.clear();
  56     }
  57 
  58     static class TagCache  {
  59         final LCMSProfile profile;
  60         private HashMap<Integer, TagData> tags;
  61 
  62         TagCache(LCMSProfile p) {
  63             profile = p;
  64             tags = new HashMap<>();
  65         }
  66