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

Implement Region image based caching

    XMLWordPrintable

Details

    Description

      Presently, we draw all region code as a series of fills, strokes, images, and / or paths.

      With the NimbusLookAndFeel, we also took this approach. We had to however optimize this in order to get the performance of, say, MetalLookAndFeel. We did this by maintaining a cache which we would render the equivalent of a Region into (given some state) at some smallish size (say, 19x9 or whatnot, depending on the insets and radii of the region). We then would subsequently render this region using 9-square image stretching techniques on all subsequent usages.

      In reality we have very few unique region drawing combinations, and could fit them all within a 256x256 texture (probably).

      In addition, paths such as arrows and such could be rendered once and reused thereafter, whereas at the moment we are constantly uploading texture masks for those paths.

      We need to implement an image cache and 9-square image scaling for regions. With Nimbus we had a maximum cache size, where upon we would throw out the least-recently-used cache'd images when we faced overflow (or maybe we just cleared the whole thing and started rebuilding again -- should check to see what technique we actually used to handle overflow).

      Attachments

        Issue Links

          Activity

            People

              rbair Richard Bair (Inactive)
              rbair Richard Bair (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: