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

[XWayland][Screencast] consequent getPixelColor calls are slow

    XMLWordPrintable

Details

    • b12

    Description

      Some tests are calling getPixelColor in a loop
      e.g.
              for (int i = 0; i < 50; i++) {
                  for (int j = 0; j < 50; j++) {
                      robot.getPixelColor(i, j);
                  }
              }
      While this is not the most efficient way to get data from the screen (you can use createScreenCapture), it can be sped up.

      Currently we create a screencast session from scratch for each call to getPixelColor or createScreenCapture.
      To speed it up, we can close the session after some reasonable time (2s for example) if there is no new screen capture attempt.

      We should also change the tests to use createScreenCapture in such cases.

      Attachments

        Issue Links

          Activity

            People

              azvegint Alexander Zvegintsev
              azvegint Alexander Zvegintsev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: