On 8/30/2016 10:34 PM, Sergey Bylokhov wrote:
Hi, Alex.
Looks fine.

 - Note that this code uses the logic similar to JViewport:
switch (volatileImage.validate(config)) {
.........
}

= Also note that another possible solution is to use this pattern in the createImage():
        if (config == null) {
            return new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
        }
return config.createCompatibleVolatileImage(w, h, OPAQUE/BITMASK/TRANSLUCENT);
In this case all images in the cache will be VI if config is != null.
I have filled an enhancement on it: JDK-8165077 Replace BufferedImage to VolatileImage in CachedPainter.

  Thanks,
  Alexandr.


On 30.08.16 12:13, Alexandr Scherbatiy wrote:

Could you review the fix:
  bug: https://bugs.openjdk.java.net/browse/JDK-8163193
  webrev: http://cr.openjdk.java.net/~alexsch/8163193/webrev.00

  This is a regression from the fix JDK-8143064 Icons are not properly
rendered with Windows L&F on HiDPI display.
  The graphics for VolatileImage is already scaled on HiDPI displays and
should not be scaled one more time.

 Thanks,
 Alexandr.





Reply via email to