Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6364260

GTK L&F: avoid redundant calls in GTKNativeStyle

XMLWordPrintable

    • b70
    • generic
    • solaris_10

      There are a couple methods in GTKNativeStyle that are called repeatedly, such as
      getXThickness(), getYThickness(), and getFontForState(). These methods always
      call down to native (and synchronize on the GTK lock object) even though the answer
      will be the same everytime for that style object, which is a lot of wasted effort.
      We should be able to grab these values once and cache them when the style object is
      constructed. GTKNativeStyle objects appear to be recreated when the GTK theme is
      changed, so there should be no harm in caching these values in this manner.

            stayer Kirill Kirichenko (Inactive)
            campbell Christopher Campbell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: