Re: [OpenJDK 2D-Dev] [9] RFR JDK-6357887: selected printertray is ignored under linux

2016-08-24 Thread Prasanta Sadhukhan
Thanks Phil for the comments. Modified webrev: http://cr.openjdk.java.net/~psadhukhan/6357887/webrev.02/ Regards Prasanta On 8/25/2016 12:05 AM, Phil Race wrote: In fact what you should be doing here is Attribute attr = attrs.get(Media.class); if (attr instanceof CustomMediaTray) The progr

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

2016-08-24 Thread Philip Race
FWIW I think the most important image loading use case is that some generic resource loading code - perhaps JDK code - will get a URL for where the resources are and go hunting. It is never going to call this API .. so it had better be an optimisation and not a necessity -phil. On 8/24/16, 5:

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

2016-08-24 Thread Philip Race
Alexander, Were the existing Toolkit.getImage(String/URL) APIs not enhanced to do this for you automatically ? I suppose I thought they were but they can't be since you are using getImage(String) here. IMO that would be more important than this. And in any case I don't see why this is solved o

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
+1 ...jim On 8/24/16 4:41 AM, Ajit Ghaisas wrote: Hi, The root cause of the crash is - NaN is converted to an integer and used as array index in mlib_ImageScanPoly.c. The native method previously did not check the validity of the input double argument. Now, I have added

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 mailto:james.gra...@oracle.com>> wrote: I wonder why the @throws

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

2016-08-24 Thread Avik Niyogi
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 wrote: > > I wonder why the @throws is not inherited...? > > Another way to fix this would be to implement it in t

Re: [OpenJDK 2D-Dev] RFR: 8164752: Extraneous debugging printf in hb-jdk-font.cc

2016-08-24 Thread Brian Burkhalter
Approved. Brian On Aug 24, 2016, at 12:49 PM, Phil Race wrote: > Need a quick review to get rid of a debugging message that was > inadvertenly included in a fix. Fix below .. > > https://bugs.openjdk.java.net/browse/JDK-8164752 > > > --- a/src/java.desktop/share/native/libfontmanager/hb-jdk-

[OpenJDK 2D-Dev] RFR: 8164752: Extraneous debugging printf in hb-jdk-font.cc

2016-08-24 Thread Phil Race
Need a quick review to get rid of a debugging message that was inadvertenly included in a fix. Fix below .. https://bugs.openjdk.java.net/browse/JDK-8164752 --- a/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc +++ b/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc @@ -52

Re: [OpenJDK 2D-Dev] [9] RFR JDK-6357887: selected printertray is ignored under linux

2016-08-24 Thread Phil Race
In fact what you should be doing here is Attribute attr = attrs.get(Media.class); if (attr instanceof CustomMediaTray) The program below should show that the lookup works so long as the key is the class understood by the API - not a sub-type. -phil. import javax.print.*; import javax.print.

Re: [OpenJDK 2D-Dev] [9] RFR 4885375: Page Ranges 'To Page' field must be populated based on Pageable

2016-08-24 Thread Philip Race
OK that is what I (sort of) suspected. +1 -phil. On 8/24/16, 10:08 AM, Prasanta Sadhukhan wrote: Modified testcase http://cr.openjdk.java.net/~psadhukhan/4885375/webrev.01/ On 8/24/2016 10:27 PM, Prasanta Sadhukhan wrote: Oh, it should be return 5. I was testing the 2nd issue and forgot to c

Re: [OpenJDK 2D-Dev] [9] RFR 4885375: Page Ranges 'To Page' field must be populated based on Pageable

2016-08-24 Thread Prasanta Sadhukhan
Modified testcase http://cr.openjdk.java.net/~psadhukhan/4885375/webrev.01/ On 8/24/2016 10:27 PM, Prasanta Sadhukhan wrote: Oh, it should be return 5. I was testing the 2nd issue and forgot to change it back. Regards Prasanta On 8/24/2016 10:26 PM, Philip Race wrote: Why does the test look l

Re: [OpenJDK 2D-Dev] [9] RFR 4885375: Page Ranges 'To Page' field must be populated based on Pageable

2016-08-24 Thread Prasanta Sadhukhan
Oh, it should be return 5. I was testing the 2nd issue and forgot to change it back. Regards Prasanta On 8/24/2016 10:26 PM, Philip Race wrote: Why does the test look like this ? 157 @Override 158 public int getNumberOfPages() { 159 return 0; 160 } -phil. On 8/23/1

Re: [OpenJDK 2D-Dev] [9] RFR 4885375: Page Ranges 'To Page' field must be populated based on Pageable

2016-08-24 Thread Philip Race
Why does the test look like this ? 157 @Override 158 public int getNumberOfPages() { 159 return 0; 160 } -phil. On 8/23/16, 5:05 AM, Prasanta Sadhukhan wrote: Hi All, Please review a fix whereby it is seen that Page Ranges fields in the "cross-platform" dialog does n

Re: [OpenJDK 2D-Dev] [9] RFR JDK-8154218: Non-usage of owner Frame when Frame object is passed to getPrintJob()

2016-08-24 Thread Philip Race
+1 Some day we should still consider an API that lets the application pass in an owner. -phil. On 8/24/16, 3:39 AM, Prasanta Sadhukhan wrote: Hi All, Please review a fix for an issue where it is seen that the Frame object passed to Toolkit.getPrintJob() is not used when cross platform pri

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

2016-08-24 Thread Philip Race
+1 -phil. On 8/24/16, 4:41 AM, Ajit Ghaisas wrote: Hi, The root cause of the crash is - NaN is converted to an integer and used as array index in mlib_ImageScanPoly.c. The native method previously did not check the validity of the input double argument. Now, I have added a check for

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

2016-08-24 Thread Alexander Scherbatiy
Hello, Could you review the fix: bug: https://bugs.openjdk.java.net/browse/JDK-8163854 webrev: http://cr.openjdk.java.net/~alexsch/8163854/webrev.00 The public API which allows to load an image with resolution variants based on the provided media resolution naming scheme is added: - T

Re: [OpenJDK 2D-Dev] [9] RFR JDK-8149562: TIFFField#createFromMetadataNode javadoc should provide information about sibling/child nodes that should be part of parameter node

2016-08-24 Thread Sergey Bylokhov
+1 On 24.08.16 3:49, Brian Burkhalter wrote: OK unless there are objections from Sergey tomorrow I will plan to push it as-is. Thanks, Brian On Aug 23, 2016, at 5:12 PM, Philip Race mailto:philip.r...@oracle.com>> wrote: Still fine with me. -phil. On 8/23/16, 4:18 PM, Brian Burkhalter wro

Re: [OpenJDK 2D-Dev] [REGRESSION?] Build warnings at jdhuff.c with GCC 6

2016-08-24 Thread Yasumasa Suenaga
Hi Erik, Phil, Thank you for replying. I understand background of JDK-8074827. In this particular case is shift-negative-value a new warning in GCC 6? Yes, this feature is implemented GCC 6: https://gnu.wildebeest.org/blog/mjw/2016/02/15/looking-forward-to-gcc6-many-new-warnings/ BTW, why

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

2016-08-24 Thread Ajit Ghaisas
Hi, The root cause of the crash is - NaN is converted to an integer and used as array index in mlib_ImageScanPoly.c. The native method previously did not check the validity of the input double argument. Now, I have added a check for finite double values. If NaN or INF arguments are

[OpenJDK 2D-Dev] [9] RFR JDK-8154218: Non-usage of owner Frame when Frame object is passed to getPrintJob()

2016-08-24 Thread Prasanta Sadhukhan
Hi All, Please review a fix for an issue where it is seen that the Frame object passed to Toolkit.getPrintJob() is not used when cross platform print dialog is created, so the print dialog does not have an owner Frame and therefore if the parent frame is disposed, the print dialog is not affec

Re: [OpenJDK 2D-Dev] [REGRESSION?] Build warnings at jdhuff.c with GCC 6

2016-08-24 Thread Erik Joelsson
Hello, On 2016-08-23 18:12, Phil Race wrote: On 08/23/2016 08:47 AM, Erik Joelsson wrote: Hello, I do agree that maintaining the list of disabled warnings will be impossible unless we have a structured way of tracking for which compiler versions we disable what. Ideally we should be able to e