JDK-7181437 : [OGL] Incorrect alpha used, during blit from SW to the texture.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 7u6
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: os_x
  • CPU: x86
  • Submitted: 2012-07-03
  • Updated: 2012-07-03
  • Resolved: 2012-07-03
Related Reports
Duplicate :  
Description
I found this bug when I implemented the shaped windows on macosx(7124244). 
Before 7124244 we always draw our transparent window to the BufferedImage and then blit it to the window surface(and this bug was invisible). But now we draw it directly to the window surface. So when we try to draw the BufferedImage to the surface 2 times, we see incorrect result. This happen because for the first drawImage we use SWtoSurfaceBlit and for the second we use SWtoTextureBlit(when "managed buffered image" enabled).

I assume that code for alpha verification should be the same for both blits(see suggested fix).

Small testcase attached. It is passed on jdk6 on macosx and on non opengl pipelines in jdk 7, tested on ubuntu and windows 7.

Comments
SUGGESTED FIX http://cr.openjdk.java.net/~serb/java2dbug/webrev.00/
03-07-2012