Re: [OpenJDK 2D-Dev] [2D-Dev] Review Request: JDK-8015070: Antialiased text on translucent backgrounds gets bright artifacts

2016-03-23 Thread Jim Graham
n review Have a good day Prahalad N. -Original Message- From: Jim Graham Sent: Friday, March 18, 2016 6:07 AM To: Prahalad Kumar Narayanan; 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] [2D-Dev] Review Request: JDK-8015070: Antialiased text on translucent backgrounds gets brigh

Re: [OpenJDK 2D-Dev] CFV: New 2D Group Member: Alexander Scherbatiy

2016-03-21 Thread Jim Graham
Vote: yes ...jim On 3/17/16 3:49 PM, Philip Race wrote: I hereby nominate Alexander Scherbatiy to membership in the 2D group. Alexander Scherbatiy is a current member of the Swing group and has contributed almost 200 changesets to OpenJDK :-

Re: [OpenJDK 2D-Dev] [9] Review request for 8151303 [macosx] [hidpi] JButton's low-res. icon is visible when clicking on it

2016-03-21 Thread Jim Graham
We could do that for our own filters, but any random custom filter could run into the same issue, so it might not make sense to upgrade the existing filter mechanism to always attempt to do MR filtering. We could either create a parallel set of MR-aware filter mechanisms (such as the

Re: [OpenJDK 2D-Dev] Review Request for JDK-8139183 : drawImage misses background's alpha channel

2016-03-03 Thread Jim Graham
brev: http://cr.openjdk.java.net/~jdv/8139183/webrev.02/ Thanks, Jay -Original Message----- From: Jim Graham Sent: Thursday, March 03, 2016 5:19 AM To: Jayathirth D V; 2d-dev@openjdk.java.net; Philip Race; Prasanta Sadhukhan Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-8139183 : drawIm

Re: [OpenJDK 2D-Dev] Review Request for JDK-8139183 : drawImage misses background's alpha channel

2016-03-02 Thread Jim Graham
The logic here has mixed up the opacities and what needs to be done about them. If the source image is opaque, then this is not a BG operation at all because the bg color would not show through an opaque image, so checking the srcData is both wrong and should be a NOP here. If we get into

Re: [OpenJDK 2D-Dev] Review Request for JDK-8139183 : drawImage misses background's alpha channel

2016-03-07 Thread Jim Graham
webrev for review : http://cr.openjdk.java.net/~jdv/8139183/webrev.03/ Thanks, Jay -Original Message- From: Jim Graham Sent: Friday, March 04, 2016 5:21 AM To: Jayathirth D V; Sergey Bylokhov Cc: 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-8139183

Re: [OpenJDK 2D-Dev] [9] Review-request for 6353518: Creation of a WritableRaster with a custom DataBuffer causes erroneous Exception

2016-03-29 Thread Jim Graham
This sounded like such a great idea that I don't think we realized the one obvious reason we can't do this... You are talking about changing the method signatures on existing public constructors. While it might be nice to have had them typed from the get-go, I don't think we can change them

Re: [OpenJDK 2D-Dev] [2D-Dev] Review Request: JDK-8015070: Antialiased text on translucent backgrounds gets bright artifacts

2016-03-29 Thread Jim Graham
uggestions. Webrev Link: http://cr.openjdk.java.net/~psadhukhan/prahlad/8015070/webrev.02/ Thank you for your time in review Have a good day Prahalad N. -Original Message- From: Jim Graham Sent: Thursday, March 24, 2016 7:57 AM To: Prahalad Kumar Narayanan; 2d-dev@openjdk.java

Re: [OpenJDK 2D-Dev] [9] Review-request for 6353518: Creation of a WritableRaster with a custom DataBuffer causes erroneous Exception

2016-03-29 Thread Jim Graham
are in sun/awt which is fine. Apologies for the diversion... ...jim On 3/29/16 1:24 PM, Sergey Bylokhov wrote: On 29.03.16 23:19, Jim Graham wrote: This sounded like such a great idea that I don't think we realized the one obvious reason we can't do this... We

Re: [OpenJDK 2D-Dev] [9] Review-request for 6353518: Creation of a WritableRaster with a custom DataBuffer causes erroneous Exception

2016-03-29 Thread Jim Graham
have indentation issues and fixing all of them will result in multiple changes masking the actual code changes that fixes the reported issue. Request you to review the updated webrev. Regards, Ajit -Original Message- From: Jim Graham Sent: Thursday, March 24, 2016 5:59 AM To: Phil Rac

Re: [OpenJDK 2D-Dev] [9] Review request for 8073320 Windows HiDPI Graphics support

2016-03-31 Thread Jim Graham
Hi Alexandr, Is there a bug filed to upgrade JLightweightFrame to allow non-integer (and X/Y) scales? We'd need this capability to implement "Swing embedded in FX" correctly on Win8.1+... ...jim On 9/22/2015 2:33 AM, Alexander Scherbatiy wrote: Hello, Could you

Re: [OpenJDK 2D-Dev] Review Request for JDK-8153363: Redundant check for number of components in PackedColorModel.equals() method

2016-04-04 Thread Jim Graham
Looks good... ...jim On 4/4/16 8:35 AM, Jayathirth D V wrote: Hi, _Please review the following fix in JDK9:_ __ Bug : https://bugs.openjdk.java.net/browse/JDK-8153363 Webrev : http://cr.openjdk.java.net/~jdv/8153363/webrev.00/ Issue : We have redundant check for

Re: [OpenJDK 2D-Dev] [9] Review-request for 6353518: Creation of a WritableRaster with a custom DataBuffer causes erroneous Exception

2016-03-29 Thread Jim Graham
e switch test that all of the other blocks have... ...jim On 3/29/16 3:31 PM, Phil Race wrote: On 03/29/2016 02:37 PM, Jim Graham wrote: Raster.java, line 894: Why was the test for dataType removed from this if statement? In a previous version .. http://cr.openjdk.java.n

Re: [OpenJDK 2D-Dev] Review Request for JDK-8153943 : In java.awt.image package some of the classes are missing hashCode() or equals() method

2016-04-22 Thread Jim Graham
This is actually a pretty nasty issue that Joe Darcy also brought up in the CCC review. In order to have symmetric testing of .equals(), we pretty much have to enforce this test at all levels, including in the original ColorModels.equals() method. If we don't enforce this in CM.equals(),

Re: [OpenJDK 2D-Dev] Review Request for JDK-8153943 : In java.awt.image package some of the classes are missing hashCode() or equals() method

2016-04-26 Thread Jim Graham
, Jay -Original Message- From: Jim Graham Sent: Saturday, April 23, 2016 7:30 AM To: Phil Race; Jayathirth D V Cc: 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-8153943 : In java.awt.image package some of the classes are missing hashCode() or equals() method

Re: [OpenJDK 2D-Dev] Review Request for JDK-7107905: equals() method in IndexColorModel doesnt exist and it relies on ColorModel.equals() which is not strict

2016-04-26 Thread Jim Graham
thread. Thanks, Jay -Original Message----- From: Jim Graham Sent: Thursday, April 14, 2016 2:57 AM To: Jayathirth D V; Philip Race Cc: 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-7107905: equals() method in IndexColorModel doesnt exist and it relies on ColorModel.equals()

Re: [OpenJDK 2D-Dev] Review Request for JDK-8153943 : In java.awt.image package some of the classes are missing hashCode() or equals() method

2016-04-26 Thread Jim Graham
On 4/25/16 8:48 AM, Sergey Bylokhov wrote: On 23.04.16 4:59, Jim Graham wrote: So, I'd recommend that CM.equals() tests getClass() == getClass() at the base level and then all others will use super.equals() and get the same protection. It means you can't have a subclass of CCM be "e

Re: [OpenJDK 2D-Dev] [9] Review request for 8152309 Seamless way of using image filters with multi-resolution images

2016-04-26 Thread Jim Graham
This all snowballed pretty far and wide. The original fix to Swing icons was trivial in comparison. In retrospect it might be better to simply offer the helper method from the original bug fix as a Toolkit solution and force applications to adopt it when dealing with MR sources:

Re: [OpenJDK 2D-Dev] [2D-Dev] Review Request: JDK-8015070: Antialiased text on translucent backgrounds gets bright artifacts

2016-04-27 Thread Jim Graham
e again for your effort in review Have a great day Prahalad N. -Original Message- From: Jim Graham Sent: Wednesday, April 27, 2016 2:12 AM To: Prahalad Kumar Narayanan; 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] [2D-Dev] Review Request: JDK-8015070: Antialiased text on translucent

Re: [OpenJDK 2D-Dev] [2D-Dev] Review Request: JDK-8015070: Antialiased text on translucent backgrounds gets bright artifacts

2016-04-26 Thread Jim Graham
(0); My apologies if the above code did not appear on the final webrev email. ( In few instances, the newlines don't appear in plain-text format ) Kindly review the changes present in webrev and provide your views. If the changes are good, we could take up for the code check-in. Thank you for your tim

Re: [OpenJDK 2D-Dev] Review Request for JDK-7116979 : Unexpected pixel colour when converting images to TYPE_BYTE_INDEXED

2016-04-29 Thread Jim Graham
ease find updated webrev for review : http://cr.openjdk.java.net/~jdv/7116979/webrev.02/ Thanks, Jay -Original Message- From: Phil Race Sent: Tuesday, April 26, 2016 11:56 PM To: Jim Graham Cc: Jayathirth D V; 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-711

Re: [OpenJDK 2D-Dev] [9] RFR JDK-6842011: StackOverflowError printing landscape with scale and transform

2016-05-23 Thread Jim Graham
e new methods a high priority to get done soon. (I'm guessing/hoping we can add small "fixup" APIs like that after FC since it doesn't really represent a "feature"...?) ...jim On 5/22/16 11:53 PM, prasanta sadhukhan wrote: Hi Jim, On 5/21/2016 3:20 AM,

Re: [OpenJDK 2D-Dev] [9] RFR JDK-6842011: StackOverflowError printing landscape with scale and transform

2016-05-23 Thread Jim Graham
ng support .. and the implementation rotates it. So an out-of-the-box advertised API that does what dev A really meant would be helpful. -phil. On 05/23/2016 11:52 AM, Jim Graham wrote: I think we need to go a bit further and change the way we describe them. If we perhaps get very technical

Re: [OpenJDK 2D-Dev] [9] RFR JDK-6842011: StackOverflowError printing landscape with scale and transform

2016-05-20 Thread Jim Graham
We should acknowledge that the test case is buggy anyway. It is not computing the scale of a transform correctly, though that is likely due to the unfortunate naming we chose for our methods. If you are looking for "the amount by which an X coordinate is stretched or contracted", you have to

Re: [OpenJDK 2D-Dev] [9] Review Request: Cleanup of sun.java2d.pipe.Region

2016-05-12 Thread Jim Graham
This looks great! I guess the final was removed from the getters because the class is now final, though it probably doesn't hurt anything to leave them final. In any case, you only removed it from 3 of them, so it is unbalanced now. I suppose Hotspot is smart enough to inline accessors in a

Re: [OpenJDK 2D-Dev] [9] Review request for 8151303 [macosx] [hidpi] JButton's low-res. icon is visible when clicking on it

2016-05-13 Thread Jim Graham
Another reason to avoid new API is that we don't have to involve the CCC to get this "bug fix" in... ...jim On 5/13/16 3:50 PM, Jim Graham wrote: That looks very tight. The only issue I'd have is that it would be better if this could be done with non-

Re: [OpenJDK 2D-Dev] [9] Review request for 8151303 [macosx] [hidpi] JButton's low-res. icon is visible when clicking on it

2016-05-13 Thread Jim Graham
-resolution image to another: Image image = // original image Image filteredImage = MultiResolutionImage.map(image, (img) -> /* return filtered image */); Thanks, Alexandr. On 21/03/16 22:31, Jim Graham wrote: We could do that for our own filters, but any random cus

Re: [OpenJDK 2D-Dev] [9] Review Request: Cleanup of sun.java2d.pipe.Region

2016-05-12 Thread Jim Graham
Looks good +1. Is there a bug filed for this? ...jim On 5/12/16 1:50 PM, Sergey Bylokhov wrote: This looks great! I guess the final was removed from the getters because the class is now final, though it probably doesn't hurt anything to leave them final. In any case,

Re: [OpenJDK 2D-Dev] Review Request for JDK-8153943 : In java.awt.image package some of the classes are missing hashCode() or equals() method

2016-05-03 Thread Jim Graham
... ...jim On 5/3/2016 2:00 PM, Phil Race wrote: On 04/26/2016 04:10 PM, Jim Graham wrote: The ComponentColorModel implementation is a meaningless wrapper around super.equals/hashCode(). Why does it not test CCM-specific fields? It should although this looks like it is more than just running through

Re: [OpenJDK 2D-Dev] Review Request for JDK-8153943 : In java.awt.image package some of the classes are missing hashCode() or equals() method

2016-05-05 Thread Jim Graham
ation in java.awt.image.ComponentSampleModel and its subclassses". Please provide your inputs. Thanks, Jay -Original Message----- From: Jim Graham Sent: Wednesday, May 04, 2016 2:44 AM To: Phil Race Cc: 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for J

Re: [OpenJDK 2D-Dev] Review Request for JDK-7116979 : Unexpected pixel colour when converting images to TYPE_BYTE_INDEXED

2016-05-01 Thread Jim Graham
ovides custom color-map. This looks like completely different issue of not extracting proper value for white color. Thanks, Jay -----Original Message- From: Jim Graham Sent: Saturday, April 30, 2016 4:43 AM To: Jayathirth D V; Philip Race Cc: 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Rev

Re: [OpenJDK 2D-Dev] [2D-Dev] Review Request: JDK-8015070: Antialiased text on translucent backgrounds gets bright artifacts

2016-05-02 Thread Jim Graham
4. As with every change in the native code, Internal automated build system was used to ensure successful compilation across all platforms. Kindly review the changes and provide your opinion. Thank you Have a good day Prahalad N. -Original Message- From: Jim Graham Sent: Thursday, Apri

Re: [OpenJDK 2D-Dev] [9] Review request for 8160124 SunGraphics2D.hitClip() can give wrong result for floating point scale

2016-07-26 Thread Jim Graham
oordinates overflow an integer, but that would be the basic gist of what we should be doing in that case in validateCompClip()... ...jim On 07/26/2016 02:50 PM, Sergey Bylokhov wrote: On 13.07.16 5:42, Jim Graham wrote: What does the compClip end up being in

Re: [OpenJDK 2D-Dev] Review request for: JDK-8147542 Linux: ClassCastException when repainting after display resolution change

2016-07-22 Thread Jim Graham
+1 from me too... ...jim On 07/22/2016 10:16 AM, Phil Race wrote: This is OK by me. -phil. On 07/22/2016 02:20 AM, Alexey Ushakov wrote: Friendly reminder :) Best Regards, Alexey On 13 Jul 2016, at 12:33, Alexey Ushakov

Re: [OpenJDK 2D-Dev] Review Request for JDK-8160943 : [PIT] new failure of closed/javax/imageio/ReadAllThumbnailsTest.java

2016-07-22 Thread Jim Graham
I just ran the test case attached in https://bugs.openjdk.java.net/browse/JDK-4958271 . It is actually generating an image and using it to do reader.readAll(). Thanks, Jay -Original Message----- From: Jim Graham Sent: Thursday, July 21, 2016 2:22 PM To: Jayathirth D V; Philip Race Cc: 2d-dev Subj

Re: [OpenJDK 2D-Dev] Review Request for JDK-7107905: ColorModel subclasses are missing hashCode() or equals() or both methods

2016-07-21 Thread Jim Graham
-Original Message- From: Jim Graham Sent: Tuesday, July 12, 2016 7:41 PM To: Jayathirth D V; Philip Race Cc: 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-7107905: ColorModel subclasses are missing hashCode() or equals() or both methods Hi Jay, When I write

Re: [OpenJDK 2D-Dev] Review Request for JDK-8160943 : [PIT] new failure of closed/javax/imageio/ReadAllThumbnailsTest.java

2016-07-21 Thread Jim Graham
icular image) with new image that I have created. Thanks, Jay -Original Message- From: Philip Race Sent: Wednesday, July 13, 2016 10:06 AM To: Jim Graham Cc: Jayathirth D V; 2d-dev Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-8160943 : [PIT] new failure of closed/javax/imageio/Re

Re: [OpenJDK 2D-Dev] RFR 8159638: Improve array caches and renderer stats in Marlin renderer

2016-07-21 Thread Jim Graham
Hi Laurent, On 07/21/2016 06:56 AM, Laurent Bourgès wrote: I don't have any issues with those numbers, but the way that they are calculated makes it look like they are supposed to be unique numbers and yet through the obscurity of the loops used to populate the sizes they just

Re: [OpenJDK 2D-Dev] Review Request for JDK-8153943 : In PixelInterLeavedSampleModel and BandedSampleModel we dont need hashCode() method

2016-07-28 Thread Jim Graham
se find webrev for the above changes: http://cr.openjdk.java.net/~jdv/8153943/webrev.04/ Thanks, Jay -Original Message----- From: Jim Graham Sent: Thursday, June 30, 2016 4:22 AM To: Phil Race Cc: Jayathirth D V; 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request f

Re: [OpenJDK 2D-Dev] RFR: 8074843: Resolve disabled warnings for libmlib_image and libmlib_image_v

2016-08-02 Thread Jim Graham
I agree as well. Assignments really aren't ever needed inside if statements... ...jim On 08/02/2016 03:06 PM, Vadim Pakhnushev wrote: Or as j = w & 1; if (j != 0) { as in other longer cases. Too much parentheses to my taste. Vadim On 03.08.2016 1:04, Jim Gr

Re: [OpenJDK 2D-Dev] [9] Review request for 8160124 SunGraphics2D.hitClip() can give wrong result for floating point scale

2016-08-02 Thread Jim Graham
On 08/02/2016 10:36 AM, Sergey Bylokhov wrote: On 27.07.16 1:56, Jim Graham wrote: Rectangle2D rClip = (Rectangle2D) usrClip; int x0 = (int) Math.ceil(rClip.getMinX() - 0.5); int y0 = (int) Math.ceil(rClip.getMinY() - 0.5); int x1 = (int) Math.ceil(rClip.getMaxX() - 0.5); int x1 = (int

Re: [OpenJDK 2D-Dev] RFR 8159638: Improve array caches and renderer stats in Marlin renderer

2016-08-02 Thread Jim Graham
Thanks Laurent, On 08/02/2016 05:57 AM, Laurent Bourgès wrote: Thanks for the tip, I made another webrev (for archive) that shows the proper diffs in ArrayCache / ArrayCacheConst: http://cr.openjdk.java.net/~lbourges/marlin/marlin-8159638.1_bis/

Re: [OpenJDK 2D-Dev] RFR: 8074843: Resolve disabled warnings for libmlib_image and libmlib_image_v

2016-08-02 Thread Jim Graham
taste. Vadim On 03.08.2016 1:04, Jim Graham wrote: In that case, then I'd write it as "if ((j = (w & 1)) != 0)" to make it clear that the LHS is an assignment. A casual reading of the code might see this as a comparison with an extra set of parentheses until someone counts the equal

Re: [OpenJDK 2D-Dev] RFR: 8074843: Resolve disabled warnings for libmlib_image and libmlib_image_v

2016-08-02 Thread Jim Graham
In that case, then I'd write it as "if ((j = (w & 1)) != 0)" to make it clear that the LHS is an assignment. A casual reading of the code might see this as a comparison with an extra set of parentheses until someone counts the equal signs... ...jim On 08/02/2016

Re: [OpenJDK 2D-Dev] [9] RFR: JDK-8160943 : skipImage() in JPEGImageReader class throws IIOException if we have gaps between markers in Jpeg image

2016-08-01 Thread Jim Graham
Hi Jay, This looks good... ...jim On 8/1/16 1:26 AM, Jayathirth D V wrote: Hi, Please review the following fix in JDK9 at your convenience: Bug : https://bugs.openjdk.java.net/browse/JDK-8160943 Webrev : http://cr.openjdk.java.net/~jdv/8160943/webrev.00/

Re: [OpenJDK 2D-Dev] RFR 8159638: Improve array caches and renderer stats in Marlin renderer

2016-08-01 Thread Jim Graham
+ the putArray method always performs the array cleanup - ArrayCache renamed to ArrayCacheConst + simplified thresholds More comments, below: 2016-07-21 23:41 GMT+02:00 Jim Graham <james.gra...@oracle.com <mailto:james.gra...@oracle.com>>: On 07/21/2016 06:56 AM, Laurent B

Re: [OpenJDK 2D-Dev] [9] Review request for 8151303 [macosx] [hidpi] JButton's low-res. icon is visible when clicking on it

2016-08-11 Thread Jim Graham
/2016 01:32 AM, Alexander Scherbatiy wrote: Could you review the updated fix: http://cr.openjdk.java.net/~alexsch/8151303/webrev.03 MultiResolutionToolkitImage handing is added to the MultiResolutionCachedImage.map() method. Thanks, Alexandr. On 11/08/16 01:46, Jim Graham wrote: Ah, yes, only

Re: [OpenJDK 2D-Dev] [9] Review request for 8151303 [macosx] [hidpi] JButton's low-res. icon is visible when clicking on it

2016-08-10 Thread Jim Graham
non-MRCI... ...jim On 8/10/16 5:35 AM, Alexander Scherbatiy wrote: On 09/08/16 03:49, Jim Graham wrote: Does MultiResolutionCachedImage.map() work if the Image hasn't been loaded yet (where getWidth/Height(Observer) can return -1)? Can it ever be called in a case like that? Could we rely o

Re: [OpenJDK 2D-Dev] RFR 8159638: Improve array caches and renderer stats in Marlin renderer

2016-08-03 Thread Jim Graham
openjdk.java.net/~lbourges/marlin/marlin-8159638.2/ Cheers, Laurent 2016-08-03 2:28 GMT+02:00 Jim Graham <james.gra...@oracle.com <mailto:james.gra...@oracle.com>>: How about instead of the shell script we put a comment up at the top of the files (after the copyright header), with

Re: [OpenJDK 2D-Dev] [9]Fix for JDK-8158356 : SIGSEGV when attempting to rotate BufferedImage using AffineTransform by NaN degrees

2016-08-10 Thread Jim Graham
This does address the specific test case directly, but I'd be happier if we dug down and figured out where it went wrong in trying to transform the image and put in a fix that addressed the root problem whether it comes from the inputs being NaN or from some other similar condition that could

Re: [OpenJDK 2D-Dev] Review Request for JDK-8160943 : [PIT] new failure of closed/javax/imageio/ReadAllThumbnailsTest.java

2016-07-12 Thread Jim Graham
webrev.00/ Thanks, Jay *From:*Phil Race *Sent:* Saturday, July 09, 2016 12:37 AM *To:* Jayathirth D V *Cc:* Jim Graham; 2d-dev *Subject:* Re: REG : JDK-8160943 : [PIT] new failure of closed/javax/imageio/ReadAllThumbnailsTest.java On 07/08/2016 04:08 AM, Jayathirth D V wrote:

Re: [OpenJDK 2D-Dev] Review Request for JDK-7107905: ColorModel subclasses are missing hashCode() or equals() or both methods

2016-07-12 Thread Jim Graham
ColorModel equals and hashCode methods should spell out the protocol subclasses need to follow to obey the respective contracts of methods.", I have discussed with Phil also regarding the same offline. Any inputs on this also would be helpful. Thanks, Jay -Original Message- From

Re: [OpenJDK 2D-Dev] REG : JDK-8160943 : [PIT] new failure of closed/javax/imageio/ReadAllThumbnailsTest.java

2016-07-12 Thread Jim Graham
if it is universally considered a valid JPEG? ...jim On 7/12/16 6:57 PM, Jim Graham wrote: That doesn't appear to be happening in this case. If you take the APP0 marker lengths at face value, there are 3 APP0 markers. The first has a length that brings you to the second one

Re: [OpenJDK 2D-Dev] REG : JDK-8160943 : [PIT] new failure of closed/javax/imageio/ReadAllThumbnailsTest.java

2016-07-12 Thread Jim Graham
That doesn't appear to be happening in this case. If you take the APP0 marker lengths at face value, there are 3 APP0 markers. The first has a length that brings you to the second one. The second one has a length that takes you 2 bytes short of the next. The intervening bytes are 00,00 which

Re: [OpenJDK 2D-Dev] [9] Review request for 8160124 SunGraphics2D.hitClip() can give wrong result for floating point scale

2016-07-12 Thread Jim Graham
What does the compClip end up being in that case? ...jim On 7/4/16 1:12 AM, Sergey Bylokhov wrote: On 01.07.16 2:49, Jim Graham wrote: How is it returning true? If the clip really is empty, then intersectsQuickCheck() should never return true. Or are you saying

Re: [OpenJDK 2D-Dev] RFR 8159638: Improve array caches and renderer stats in Marlin renderer

2016-07-19 Thread Jim Graham
Hi Laurent, Some work should be done on the comments at the top of ArrayCache.java - line 38 and 42 make the same claim about 2 different thresholds. It seems silly, but in ArrayCache.getNewLargeSize(), lines 162 and 164 are both ">" tests and then the newly added test at 166 is a "<" test.

Re: [OpenJDK 2D-Dev] Review Request for JDK-8153943 : In PixelInterLeavedSampleModel and BandedSampleModel we dont need hashCode() method

2016-06-28 Thread Jim Graham
e layout and pixel fetching behavior for a specific configuration of PISM and BSM are identical, they are philosophically not the same and so should not evaluate as equals()... ...Or, should they? ...jim On 6/27/16 4:05 PM, Jim Graham wrote: This is odd that two completely

Re: [OpenJDK 2D-Dev] [9] Review request for 8151303 [macosx] [hidpi] JButton's low-res. icon is visible when clicking on it

2016-08-08 Thread Jim Graham
. On 27/06/16 22:17, Alexander Scherbatiy wrote: Hello, Could you review the updated fix: http://cr.openjdk.java.net/~alexsch/8151303/webrev.02 The fix does not use a new public API to apply filters to multi-resolution images. Thanks, Alexandr. On 14/05/16 02:54, Jim Graham

Re: [OpenJDK 2D-Dev] [9] Fix for JDK-8160421 : Regression: JDK-8139192 causes NPE in java.awt.Toolkit.createCustomCursor()

2016-06-30 Thread Jim Graham
The solution looks fine to me. I didn't run the test case, but about the only issue I can see with it is whether it should have a flag to run it in its own VM because of its interaction with System.err. Phil? ...jim On 06/30/2016 06:41 AM, Ajit Ghaisas wrote: Hi,

Re: [OpenJDK 2D-Dev] RFR: 8160693: ScriptRunData.java uses bitwise AND instead of logical AND

2016-06-30 Thread Jim Graham
I don't see the need for the extra parentheses in this particular case, but the change/fix looks good... ...jim On 06/30/2016 03:25 PM, Phil Race wrote: Bug: https://bugs.openjdk.java.net/browse/JDK-8160693 Fix :- hg diff

Re: [OpenJDK 2D-Dev] [9] Review request for 8160124 SunGraphics2D.hitClip() can give wrong result for floating point scale

2016-06-30 Thread Jim Graham
)? On 24.06.16 1:14, Jim Graham wrote: Think of this method as asking: I don't want you to waste a lot of time, but tell me if it is silly for me to even consider rendering something with these bounds. And the answer is either "Oh, yeah, it is inconceivable that those bounds would be rende

Re: [OpenJDK 2D-Dev] Review Request for JDK-8153943 : In PixelInterLeavedSampleModel and BandedSampleModel we dont need hashCode() method

2016-06-29 Thread Jim Graham
degenerate case), whilst instances (of the different classes) could compare as equal. But in either case we need to look to the super-class which is lacking any documentation of its own describing what makes two instances equal. We could try to explain there what might otherwise be surprising. -phil.

Re: [OpenJDK 2D-Dev] Review Request for JDK-7107905: ColorModel subclasses are missing hashCode() or equals() or both methods

2016-06-29 Thread Jim Graham
equals() method in ColorModel and its subclasses I have updated the spec for the same. Please find updated webrev for review: http://cr.openjdk.java.net/~jdv/7107905/webrev.11/ Thanks, Jay -Original Message- From: Jim Graham Sent: Saturday, June 04, 2016 4:52 AM To: Jayathirth D V; Philip Race

Re: [OpenJDK 2D-Dev] [9] Review request for 8151303 [macosx] [hidpi] JButton's low-res. icon is visible when clicking on it

2016-08-15 Thread Jim Graham
:10, Jim Graham wrote: Hi Alexandr, Should something be done to transfer the array of sizes to the new instance if the source is an MRCI? Perhaps a special case for MRCI as well that calls mrciInstance.map(mapper) instead of constructing a brand new object from scratch? ...jim On 08

Re: [OpenJDK 2D-Dev] Review Request for JDK-7107905: ColorModel subclasses are missing hashCode() or equals() or both methods

2017-01-31 Thread Jim Graham
nuary 31, 2017 11:53 AM To: Philip Race; Jim Graham; 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-7107905: ColorModel subclasses are missing hashCode() or equals() or both methods Hi Phil & Jim, Thanks for your inputs. I have verified with previous iteration of

Re: [OpenJDK 2D-Dev] Review Request for JDK-7107905: ColorModel subclasses are missing hashCode() or equals() or both methods

2017-02-09 Thread Jim Graham
---Original Message- From: Jayathirth D V Sent: Wednesday, February 08, 2017 3:41 PM To: Jim Graham; Philip Race; 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-7107905: ColorModel subclasses are missing hashCode() or equals() or both methods Hello All, I have u

Re: [OpenJDK 2D-Dev] 8138771: java.awt.image.AbstractMultiResolutionImage needs customized spec for methods of Image which it implements

2016-08-24 Thread Jim Graham
Hi Avik, On 8/23/16 11:43 PM, Avik Niyogi wrote: Hi Jim, Just a few queries I have regarding the inputs provided. I have added them inline in red. Thank you for further inputs in advance. On 24-Aug-2016, at 3:02 am, Jim Graham <james.gra...@oracle.com <mailto:james.gra...@oracle.com&g

Re: [OpenJDK 2D-Dev] [9]Fix for JDK-8158356 : SIGSEGV when attempting to rotate BufferedImage using AffineTransform by NaN degrees

2016-08-24 Thread Jim Graham
hilip Race Sent: Thursday, August 11, 2016 3:22 AM To: Jim Graham Cc: Ajit Ghaisas; 2d-dev Subject: Re: [OpenJDK 2D-Dev] [9]Fix for JDK-8158356 : SIGSEGV when attempting to rotate BufferedImage using AffineTransform by NaN degrees Agreed, I had previously asked for that too (off-line). ie. root cause

Re: [OpenJDK 2D-Dev] [8u Backport] Fix for JDK-8158356 : SIGSEGV when attempting to rotate BufferedImage using AffineTransform by NaN degrees

2016-09-01 Thread Jim Graham
Hi Ajit, In the cases where you "continue" on a non-finite slope, doesn't that mean that the edges will be mismatched? If you can't determine the bounding polygon, perhaps the entire operation should be aborted instead...? It's different from the case of dy1==dy2 which also results in a

Re: [OpenJDK 2D-Dev] Different rounding applied by ProcessPath and ShapeSpanIterator

2016-09-26 Thread Jim Graham
xplanation was at least 90% accurate... ...jim On 9/26/16 11:55 AM, Jim Graham wrote: They do operate differently. They aren't meant to be mixed and matched. One thing that may shed some light is the STROKE_CONTROL hint. If it is sent to Pure then there is no heurist

Re: [OpenJDK 2D-Dev] Different rounding applied by ProcessPath and ShapeSpanIterator

2016-09-26 Thread Jim Graham
They do operate differently. They aren't meant to be mixed and matched. One thing that may shed some light is the STROKE_CONTROL hint. If it is sent to Pure then there is no heuristic for how to rasterize and all rasterizers should agree on how to scan convert shapes. But, if it is set to

Re: [OpenJDK 2D-Dev] [8u Backport] Fix for JDK-8158356 : SIGSEGV when attempting to rotate BufferedImage using AffineTransform by NaN degrees

2016-09-29 Thread Jim Graham
will address the review comment in JDK-8166009. The original backport webrev is still the same. http://cr.openjdk.java.net/~aghaisas/8158356/8u_backport/webrev.00/ Request you to approve this 8u backport. Regards, Ajit -Original Message- From: Jim Graham Sent: Friday, September

Re: [OpenJDK 2D-Dev] HiDPI support issues on Windows

2016-10-04 Thread Jim Graham
On 10/4/16 1:01 PM, Anton Tarasov wrote: - Simply ask for a large enough integer to make sure you got the entire clip to fit in it and let the allocator give you an even larger image. It doesn't matter if you paint into a larger image (other than having to allocate an extra row/column on

Re: [OpenJDK 2D-Dev] HiDPI support issues on Windows

2016-10-04 Thread Jim Graham
I wasn't familiar with the test code for this particular case. Is it in a bug report somewhere? ...jim On 10/4/16 1:01 PM, Anton Tarasov wrote: Also, the problem with primitives rendering (http://cr.openjdk.java.net/%7Eant/hidpi_pics/Scaling-150-percent.png) is still

Re: [OpenJDK 2D-Dev] HiDPI support issues on Windows

2016-10-04 Thread Jim Graham
On 10/4/16 1:01 PM, Anton Tarasov wrote: Anyway, I roughly tried your approach mentioned in the previous e-mail, but forcing RM to paint via offscreen BufferedImage, not volatile (just for a quick check). It solved the shift issue of the demo listed in 8162350, which is cool. It also solved

Re: [OpenJDK 2D-Dev] [9] Review Request: 8167310 The graphics clip is incorrectly rounded for some fractional scales

2016-10-07 Thread Jim Graham
That looks great. A couple of questions. Region, line 132: why are you testing for newv > coordinate? Test case: Where do you get white gaps? Is it in the line test? If so, then consider setting the line width higher (or drawing 2 lines per iteration as I mention in the last paragraph). I

Re: [OpenJDK 2D-Dev] HiDPI support issues on Windows

2016-10-07 Thread Jim Graham
to scroll, it gets a little dicey unless the scroll mode is considered just a hint. ...jim On 10/7/16 3:41 PM, Jim Graham wrote: Aren't the components inside the scrollpane located relative to the origin of the entire scrollable region? In which case, the precise location

Re: [OpenJDK 2D-Dev] HiDPI support issues on Windows

2016-10-07 Thread Jim Graham
fractional coordinate which we cannot use via int API. On 07.10.16 0:21, Jim Graham wrote: Yes, most likely. It involves making sure that the origin of the viewport is always an even multiple of pixels, then the copyArea will match up with the repainting. The damage repair messages here have

Re: [OpenJDK 2D-Dev] HiDPI support issues on Windows

2016-10-06 Thread Jim Graham
16 1:46 PM, Anton Tarasov wrote: On 10/4/2016 11:30 PM, Jim Graham wrote: I wasn't familiar with the test code for this particular case. Is it in a bug report somewhere? Jim, I'm re-attaching it (it was in my first e-mail). Thanks, Anton. ...jim On 10/4/16 1:01 PM, Anton Tarasov wr

Re: [OpenJDK 2D-Dev] HiDPI support issues on Windows

2016-10-06 Thread Jim Graham
of the graphics)... ...jim On 10/6/16 3:11 AM, Anton Tarasov wrote: Hi all, On 04 Oct 2016, at 23:28, Jim Graham <james.gra...@oracle.com> wrote: On 10/4/16 1:01 PM, Anton Tarasov wrote: Anyway, I roughly tried your approach mentioned in the previous e-mail, but forc

Re: [OpenJDK 2D-Dev] HiDPI support issues on Windows

2016-10-05 Thread Jim Graham
. On 02.10.16 22:10, Jim Graham wrote: After looking into the code in RepaintManager and re-reading Alexander's message again I can see how it describes what is going on more clearly. Fixing the rounding errors doesn't necessarily require avoiding use of the intermediate image for damage repair, you just

Re: [OpenJDK 2D-Dev] [9] Review request for 8163854 Add ToolkitImage.getImage() method which loads an image with schema variant

2016-09-23 Thread Jim Graham
that need a whole new API class to support a list of strings ? And it still not a "schema". It is simply one of a list of suffixes. -phil. On 9/22/16, 1:51 PM, Jim Graham wrote: If I am developing a skinned UI and I provide a set of 20 images for various parts of the controls and then hand

Re: [OpenJDK 2D-Dev] [9] Review request for 8163854 Add ToolkitImage.getImage() method which loads an image with schema variant

2016-09-21 Thread Jim Graham
I think this is a good point. The only gotcha would appear to be handling the ImageObserver notifications and the prepareImage() calls. The ImageObserver should get the variant's dimensions as one of the first notifications, though if they trigger an image load and then add an observer later,

Re: [OpenJDK 2D-Dev] [9] Review request for 8163854 Add ToolkitImage.getImage() method which loads an image with schema variant

2016-09-22 Thread Jim Graham
things as Phil suggests... ...jim On 9/21/16 5:48 PM, Jim Graham wrote: I think this is a good point. The only gotcha would appear to be handling the ImageObserver notifications and the prepareImage() calls. The ImageObserver should get the variant's dimensions

Re: [OpenJDK 2D-Dev] [9] Review request for 8163854 Add ToolkitImage.getImage() method which loads an image with schema variant

2016-09-22 Thread Jim Graham
If I am developing a skinned UI and I provide a set of 20 images for various parts of the controls and then hand off to my graphic designer to create the DPI variants for all of the images, it is much easier for me to tell them to name all of the images with suffixes for the DPI variants and

Re: [OpenJDK 2D-Dev] 8138771: java.awt.image.AbstractMultiResolutionImage needs customized spec for methods of Image which it implements

2016-08-23 Thread Jim Graham
I wonder why the @throws is not inherited...? Another way to fix this would be to implement it in the base Image class with the throw and all classes that can return a graphics override it. Then you wouldn't even need documentation in the AMRI class just to say "never mind we don't provide

Re: [OpenJDK 2D-Dev] HiDPI support issues on Windows

2016-10-03 Thread Jim Graham
Hi Anton, Yes, the numbers you are describing are consistent with performing that standard boilerplate using an origin/translate that is not exactly at an integer pixel location. My comments about our mechanisms not allowing for scale-aware allocations can be dealt with in a couple of ways:

Re: [OpenJDK 2D-Dev] HiDPI support issues on Windows

2016-09-30 Thread Jim Graham
On 9/30/16 3:22 AM, Alexandr Scherbatiy wrote: The problem is that the RepaintManager draws a region to a buffered image at first and draws the image after that to the window. Suppose the image has int coordinates and size (x, y, w, h) in the user space. It should be drawn into the region

Re: [OpenJDK 2D-Dev] HiDPI support issues on Windows

2016-10-02 Thread Jim Graham
ate by an integer amount, and then scale g.setClip(pixelx1, pixely1, pixelw, pixelh) g.translate(pixelx1, pixely1) g.scale(scaleX, scaleY); component.paint(g) destinationg.setTransform(IDENTITY) destinationg.drawImage(img, pixelx1, pixely1) // (restore transforms where needed)

Re: [OpenJDK 2D-Dev] Request for Review: JDK-8162591 All existing gradient paint implementations have issues with coordinates/sizes larger than Short.MAX_VALUE (exactly) on any Linux systems

2016-09-27 Thread Jim Graham
All of those conditions are optimized equivalents to getting the determinant. invert() is a destructive call, but since getTransform is documented to return a copy, that is fine - but getDeterminant() will involve less math to check the condition... ...jim On 9/27/16

Re: [OpenJDK 2D-Dev] [9] Review Request: 8167310 The graphics clip is incorrectly rounded for some fractional scales

2016-10-10 Thread Jim Graham
Hi Sergey, Comments inline... On 10/8/16 2:15 PM, Sergey Bylokhov wrote: On 08.10.16 0:58, Jim Graham wrote: That looks great. A couple of questions. An updated version and a comments inline: http://cr.openjdk.java.net/~serb/8167310/webrev.01 Test case: Where do you get white gaps

Re: [OpenJDK 2D-Dev] [9] Review Request: 8167310 The graphics clip is incorrectly rounded for some fractional scales

2016-10-10 Thread Jim Graham
That does sound like a problem. Does it do the same thing with new Path2D(Rectangle)? The Area class does some processing on the path and it would be nice to eliminate that as a potential source of this problem. I don't have a buildable JDK9 repo right now that I can fire off some quick tests

Re: [OpenJDK 2D-Dev] [9] Review Request: 8167310 The graphics clip is incorrectly rounded for some fractional scales

2016-10-10 Thread Jim Graham
Yes, we do bias both. So, the code we just added doesn't match the biasing that is performed by the fill operations, we should probably make it be the same. You can see that it computes a bias boolean when it calls getFillSSI(), but the bias is applied natively in the native ShapeSpanIterator

Re: [OpenJDK 2D-Dev] [9] Review Request: 8167310 The graphics clip is incorrectly rounded for some fractional scales

2016-10-10 Thread Jim Graham
depends on what image was painted first). - Should the clip be affected by the stroke(if it was set by the shape)? Right now if the clip was set by the shape it will produce different result than if it was set via rectangle. On 10.10.16 22:29, Jim Graham wrote: That does sound like a problem

Re: [OpenJDK 2D-Dev] [9] Review Request: 8167310 The graphics clip is incorrectly rounded for some fractional scales

2016-10-10 Thread Jim Graham
On 10/10/16 11:55 AM, Sergey Bylokhov wrote: On 10.10.16 21:31, Jim Graham wrote: OK, but you only need a line width of 2.0 to cover the gap regardless of scale. Line width scales in user space so larger scales scale up the line width along with the clip region being rendered

Re: [OpenJDK 2D-Dev] [9] Review Request: 8167310 The graphics clip is incorrectly rounded for some fractional scales

2016-10-10 Thread Jim Graham
[CC'ing Phil in case he has some suggestions for how the API should work...] Responding just to additional questions in this email... On 10/10/16 12:45 PM, Sergey Bylokhov wrote: The additional questions: - In the current fix we change behavior of the clip. Before the fix if we set the clip

Re: [OpenJDK 2D-Dev] [9] Review Request: 8167310 The graphics clip is incorrectly rounded for some fractional scales

2016-10-28 Thread Jim Graham
below... ...jim On 10/28/16 6:40 AM, Alexandr Scherbatiy wrote: On 10/11/2016 10:13 PM, Sergey Bylokhov wrote: On 11.10.16 21:54, Jim Graham wrote: Additionally, for AA rendering, there is no such thing as "setClip(someShape)" and "fill(sameShape)"

Re: [OpenJDK 2D-Dev] [9] Review Request: 8167310 The graphics clip is incorrectly rounded for some fractional scales

2016-10-28 Thread Jim Graham
out below... ...jim On 10/28/16 6:40 AM, Alexandr Scherbatiy wrote: On 10/11/2016 10:13 PM, Sergey Bylokhov wrote: On 11.10.16 21:54, Jim Graham wrote: Additionally, for AA rendering, there is no such thing as "setClip(someShape)" and "fill(sameShape)" being identi

Re: [OpenJDK 2D-Dev] [9] Review Request: 8167310 The graphics clip is incorrectly rounded for some fractional scales

2016-11-02 Thread Jim Graham
it is possible to tweak the transform? I mean that we can apply the "round", then calculate the diff between resulted destination and destination based on transform, and shift/rescale the transform so it will map exactly the pixels from source edges to destination edges. On 29.10.16 0:47,

Re: [OpenJDK 2D-Dev] [9] Review Request: 8167310 The graphics clip is incorrectly rounded for some fractional scales

2016-10-11 Thread Jim Graham
Also, is it worth having a protective test for Rectangle in the intersect(Rectangle2D) method to avoid all of the double math when the rectangle was already an integer one? ...jim On 10/10/16 4:37 PM, Sergey Bylokhov wrote: On 10.10.16 23:42, Jim Graham wrote: Can we

<    1   2   3   4   5   6   7   >