hg: openjfx/2.2/graphics/rt: Fix for RT-21830: Improve Color startup by shortening the rgb calls for the predefined colors.

hang.vo at oracle.com hang.vo at oracle.com
Wed May 30 12:32:32 PDT 2012


Changeset: 9e776e8ca832
Author:    rbair
Date:      2012-05-30 12:24 -0700
URL:       http://hg.openjdk.java.net/openjfx/2.2/graphics/rt/rev/9e776e8ca832

Fix for RT-21830: Improve Color startup by shortening the rgb calls for the predefined colors.

The fix was to add a private constructor which takes 3 params instead of 4, all floats. (The 3 vs. 4 params makes it easier to make sure that we're only calling this constructor internally for the static colors). The static colors were converted over to use this constructor, and using pre-computed r, g, b float values (vs. the old approach of / 255.0 for each color at runtime).

As this was a "Medium" priorty issue, probably actually a "Minor", I don't expect major gains from this. Just a little piece of salami.

! javafx-ui-common/src/javafx/scene/paint/Color.java



More information about the openjfx-dev mailing list