JDK-6409688 : Getting the colors via PixelGrabber causes the mouse events to be reproted slow on linux/solaris
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2006-04-06
  • Updated: 2010-04-02
  • Resolved: 2006-05-03
Related Reports
Duplicate :  
Description
Getting the colors via PixelGrabber causes the mouse events to be reproted slow on linux/solaris. 

Aim of my program
------------------
To display the RBG color value on the label ,when the mouse pointer is moved on the color.

Step to reproduce:
------------------
1) Run the attached program. you can see a frame with four color on it .
2) Move the mouse on the any color & wait for some time.  you can see the values are displayed on the lable which is at the 'South' of the Frame. Initially the values are displayed late say 3 to 5 seconds(for first time).  For the next move of mouse on some other color,the label values are update properly.

This works fine in windows_xp for first time also. But the problem is seen only in solaris / linux. This is reproducable even in Tiger also. I tested this in Tiger RC B63 & Mustang 78.
Attached the testcase to reproduce.

Comments
EVALUATION This is a duplicate of 4835595: PixelGrabber.grabPixels runs up to 600 times slower on JDK1.4.1 than on JDK1.3.1 A workaround is to disable the use of pixmaps with -Dsun.java2d.pmoffscreen=true . But unless there are api version requirements (pre-1.2) it would be better instead of using createImage+pixelGrabber, just create a BufferedImage and use BufferedImage.getRGB(). One can also use Robot api (added in 1.4) to ge the contents of the window (java.awt.Robot).
03-05-2006

EVALUATION Is there a test for reproducing this? There's no attachment to the bug.
10-04-2006