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

Lanai: Optimize index calculation while copying glyphs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 17
    • Fix Version/s: 17
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d
    • Resolved In Build:
      b22
    • CPU:
      generic
    • OS:
      os_x

      Description

      At many places where we are using replaceRegion to copy glyph into MTLTexture we have used literals for index update.

      Update them to use loop increment like :
      for (int i = 0; i < (w * h); i++) {
                          imageData[dstIndex++] = 0xFF;
                          imageData[dstIndex++] = glyph->image[srcIndex++];
                          imageData[dstIndex++] = glyph->image[srcIndex++];
                          imageData[dstIndex++] = glyph->image[srcIndex++];
      }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jdv Jayathirth D V
              Reporter:
              jdv Jayathirth D V
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: