提交 608c418a 编写于 作者: S serb

8059943: [macosx] Aqua LaF should use BI.TYPE_INT_ARGB_PRE for a better performance

Reviewed-by: alexsch, azvegint
上级 2de043dc
......@@ -62,7 +62,7 @@ public class AquaIcon {
if (w <= 0 || h <= 0) return null;
// This could be any kind of icon, so we need to make a buffer for it, draw it and then pass the new image off to appkit.
final BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
final BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB_PRE);
final Graphics g = image.getGraphics();
i.paintIcon(null, g, 0, 0);
g.dispose();
......
......@@ -129,7 +129,7 @@ public class AquaImageFactory {
};
final BufferedImage image = new BufferedImage(scaledAlertIconSize,
scaledAlertIconSize, BufferedImage.TYPE_INT_ARGB);
scaledAlertIconSize, BufferedImage.TYPE_INT_ARGB_PRE);
final Graphics g = image.getGraphics();
g.drawImage(background, 0, 0,
scaledAlertIconSize, scaledAlertIconSize, null);
......
......@@ -66,11 +66,12 @@ public class AquaNativeResources {
}
static BufferedImage getRadioButtonSizerImage() {
final BufferedImage img = new BufferedImage(20, 20, BufferedImage.TYPE_INT_ARGB);
final BufferedImage img = new BufferedImage(20, 20, BufferedImage.TYPE_INT_ARGB_PRE);
Graphics g = img.getGraphics();
g.setColor(Color.pink);
g.fillRect(0, 0, 20, 20);
g.dispose();
return img;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册