[OpenJDK 2D-Dev] Review Request for JDK-8139183 : drawImage misses background's alpha channel
Jayathirth D V
jayathirth.d.v at oracle.com
Wed Mar 9 06:44:01 UTC 2016
I have made changes mentioned by you.
Please find updated webrev:
From: Jim Graham
Sent: Wednesday, March 09, 2016 3:23 AM
To: Jayathirth D V
Cc: 2d-dev at openjdk.java.net
Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-8139183 : drawImage misses background's alpha channel
On 3/8/16 12:56 AM, Jayathirth D V wrote:
> Hi Jim,
> Thanks for the review. I have made changes in test case based on input provided.
> 1) Added contentsLost() after we drawImage() and getSnapshot() to verify the content and if it is lost loop again.
Unfortunately, if contents are lost you need to loop back to where you create the image, which means you don't have enough code inside the while loop. All of the items I mentioned below in my comment need to be included in that "loop back around". To be painfully clear here, the loop should look like this:
backgroundColor = ...; /* no need to create this inside the loop */
img = ...;
Graphics2D imgGraphics = img.createGraphics();
// fill img with transparency
} while (img.contentsLost());
The rest looked fine...
More information about the 2d-dev