equal
deleted
inserted
replaced
39 new DirectColorModel(24, 0x00ff0000, 0x0000ff00, 0x000000ff); |
39 new DirectColorModel(24, 0x00ff0000, 0x0000ff00, 0x000000ff); |
40 static ColorModel xbgrmodel = |
40 static ColorModel xbgrmodel = |
41 new DirectColorModel(24, 0x000000ff, 0x0000ff00, 0x00ff0000); |
41 new DirectColorModel(24, 0x000000ff, 0x0000ff00, 0x00ff0000); |
42 |
42 |
43 static ColorModel cachedModel; |
43 static ColorModel cachedModel; |
44 static WeakReference cached; |
44 static WeakReference<Raster> cached; |
45 |
45 |
46 static synchronized Raster getCachedRaster(ColorModel cm, int w, int h) { |
46 static synchronized Raster getCachedRaster(ColorModel cm, int w, int h) { |
47 if (cm == cachedModel) { |
47 if (cm == cachedModel) { |
48 if (cached != null) { |
48 if (cached != null) { |
49 Raster ras = (Raster) cached.get(); |
49 Raster ras = (Raster) cached.get(); |
74 return; |
74 return; |
75 } |
75 } |
76 } |
76 } |
77 } |
77 } |
78 cachedModel = cm; |
78 cachedModel = cm; |
79 cached = new WeakReference(ras); |
79 cached = new WeakReference<>(ras); |
80 } |
80 } |
81 |
81 |
82 double x1; |
82 double x1; |
83 double y1; |
83 double y1; |
84 double dx; |
84 double dx; |