From 7a50e26392e5943ed3b50cc46ea0e7e15f78340d Mon Sep 17 00:00:00 2001 From: hansonr Date: Mon, 29 Jul 2019 15:32:06 -0500 Subject: [PATCH] JAL-3383 JAL-3253-applet FeatureColourFinder avoiding unnec. creation of image graphics --- src/jalview/renderer/seqfeatures/FeatureColourFinder.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/jalview/renderer/seqfeatures/FeatureColourFinder.java b/src/jalview/renderer/seqfeatures/FeatureColourFinder.java index cfe2735..7fce08b 100644 --- a/src/jalview/renderer/seqfeatures/FeatureColourFinder.java +++ b/src/jalview/renderer/seqfeatures/FeatureColourFinder.java @@ -48,6 +48,8 @@ public class FeatureColourFinder */ private BufferedImage offscreenImage; + private Graphics goff; + /** * Constructor * @@ -57,6 +59,7 @@ public class FeatureColourFinder { featureRenderer = fr; offscreenImage = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB); + goff = offscreenImage.getGraphics(); } /** @@ -94,7 +97,7 @@ public class FeatureColourFinder */ if (featureRenderer.getTransparency() != 1f) { - g = offscreenImage.getGraphics(); + g = goff; if (defaultColour != null) { offscreenImage.setRGB(0, 0, defaultColour.getRGB()); -- 1.7.10.2