Browse Source

AWTPlotRenderer: use float arithmetic instead of double followed by a conversion

Multiplying by 0.9 and converting back to float is slightly more
complicated and achieves the same effect as multiplying by the float
0.9f directly.

Change-Id: I555863bb1251badee8887b9b93c5463eda0a3509
Signed-off-by: Jonathan Nieder <jrn@google.com>
tags/v3.7.0.201502031740-rc1
Jonathan Nieder 9 years ago
parent
commit
64162ab40d

+ 3
- 3
org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java View File

@@ -170,9 +170,9 @@ final class AWTPlotRenderer extends AbstractPlotRenderer<SwingLane, Color>
}
if (ref.getPeeledObjectId() != null) {
float[] colorComponents = g.getBackground().getRGBColorComponents(null);
colorComponents[0] *= 0.9;
colorComponents[1] *= 0.9;
colorComponents[2] *= 0.9;
colorComponents[0] *= 0.9f;
colorComponents[1] *= 0.9f;
colorComponents[2] *= 0.9f;
g.setBackground(new Color(colorComponents[0],colorComponents[1],colorComponents[2]));
}
if (txt.length() > 12)

Loading…
Cancel
Save