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

NGRegion can avoid invalidating the backgroundInsets if the Background in question does not have any percentage-based CornerRadii on any BackgroundFills

    XMLWordPrintable

    Details

      Description

      The updateBackgroundInsets method carries this claim:

          /**
           * Visits each of the background fills and takes their raddi into account to determine the insets.
           * The backgroundInsets variable is cleared whenever the fills change, or whenever the size of the
           * region has changed (because if the size of the region changed and a radius is percentage based
           * then we need to recompute the insets).
           */

      However in the setSize method, we're always clearing the backgroundInsets, even for the most common case of a Background with BackgroundFills who's insets are never based on the size of the region. For the case of animated layout or where the size of a region might be changing dynamically (think, window resizing) we're doing much more work here by recomputing the insets each time than we need to be doing.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported: