[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
Hi Jim,
I have made changes mentioned by you.
Please find updated webrev:
http://cr.openjdk.java.net/~jdv/8139183/webrev.05/
Thanks,
Jay
-----Original Message-----
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
Hi Jay,
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 */
do {
img = ...;
Graphics2D imgGraphics = img.createGraphics();
// fill img with transparency
imgGraphics.drawImage(..., bgColor);
img.getSnapShot();
imgGraphics.dispose();
} while (img.contentsLost());
The rest looked fine...
...jim
More information about the 2d-dev
mailing list