Re: AWT Dev i18n dev Add some missing key maps
I double checked your patch and confirmed that the table lookup comes after those KANA specific handling, so it looks ok to me. Naoto On 6/5/12 8:13 PM, Charles Lee wrote: Thank you Naoto. Thank you Anthony. I do not see the problem. Would some solaris guys take a look on this issue? On 06/06/2012 01:56 AM, Naoto Sato wrote: The patch is changing the code to always convert VK_KANA_LOCK to XK_Kana_Lock keysym. Does this work with Solaris? Looks like there are some piece of code that specifically handles KANA_LOCK. Naoto On 6/5/12 9:02 AM, Anthony Petrov wrote: Hi Charles, I'm not an expert in keyboard-related code, but the code changes look good to me. I think I18n team might want to take a look at the fix as well, so I'm CC'ing the i18n-dev@ mailing list. -- best regards, Anthony On 6/5/2012 7:19 AM, Charles Lee wrote: Hi awt-devs, There are some key map missing in the Japanese keyboard, for example: XK_Eisu_Shift, XK_Romaji, etc. I'd like to propose a patch @ http://cr.openjdk.java.net/~littlee/7174233/webrev.00/ http://cr.openjdk.java.net/%7Elittlee/7174233/webrev.00/ The patch is mainly about add these missing maps according to their means. Would anyone help to take a look at it? -- Yours Charles
Re: AWT Dev [8] Review request for 6868690 TEST: java/awt/FontClass/CreateFont/BigFont.java test should be modified in jdk78 to run via jtreg
Hello, I have decided to remove bigfont.html and turn an applet test into main test, because applet test always fails with timeout. I have left method runTest2() commented because it requires rather large font file (included http://hg.openjdk.java.net/jdk8/awt/jdk/file/b57167b71169/test/java/awt/FontClass/CreateFont/A.ttf font is a small file). I have added fix for test/java/awt/FontClass/CreateFont/fileaccess/FontFile.java as it was done in jdk 7u4b11, and the test always passed with jdk 8 (it is also a part of bug 6868690). Here is the webrev: http://cr.openjdk.java.net/~kshefov/6868690/webrev.00/ http://cr.openjdk.java.net/%7Ekshefov/6868690/webrev.00/ Thanks, Konstantin On 08.06.2012 16:07, Artem Ananiev wrote: On 6/8/2012 12:54 PM, Konstantin Shefov wrote: Artem, I think there are two ways: 1) create one manual test with instructions to run applet (html) in browser + one automatic test without html. Method runTest2() should be used only within applet. OK, it can be implemented by having @run applet/manual in .html file, and @run main in .java file. Thanks, Artem 2) remove html and runTest2() method at all, so only one automatic test will remain. Konstantin On 08.06.2012 13:19, Artem Ananiev wrote: Hi, Konstantin, did you consider the following option: 1. Remove .html file 2. Add one more configuration: @run main BigFont test1 @run main/manual BigFont test1 test2 3. Update the main method, so it recognizes different command line args: for (String arg: args) if (arg.equalsIgnoreCase(test1) bigTest.runTest1(); else if (arg.equalsIgnoreCase(test2) bigTest.runTest2(); The reason I'm asking about that even for manual runs people still use jtreg, just passing -m to this script. As you have removed @run from the .html file, it will not be recognized by jtreg at all. Thanks, Artem On 6/4/2012 5:32 PM, Konstantin Shefov wrote: Hi, Artem As I have mentioned in review description, we can keep .html file and runTest2() method commented in the BigFont.java if somebody wishes to run it manually (e.g. when a failure happens). The .html file and the method were kept in openjdk 7 regression testsuite. Or you think we don't need to keep it? Konstantin On 04.06.2012 17:24, Artem Ananiev wrote: Hi, Konstantin, since you have replaced @run applet in .html with @run main in .java, does it also make sense to remove .html at all? Alternatively, you can keep the test as applet one, but mark it manual (@run applet/manual). BTW, copyright header dates should be updated to 2008, 2012, not 2008, 2011. Thanks, Artem On 5/31/2012 5:59 PM, Konstantin Shefov wrote: Hello, Please review a fix for the issue: 6868690 TEST: java/awt/FontClass/CreateFont/BigFont.java test should be modified in jdk78 to run via jtreg The webrev is http://cr.openjdk.java.net/~serb/6868690/webrev.00/ The test in the current state affects a whole session if it's executed under jtreg. It was fixed already by the implemented modifications in 1.7.0 that are used as a base for modifications applicable for 1.8.0 also. There is not risk are seen if the test be updated in jdk8 repo. The current fix is identical to already pushed fix for jdk 7. The test works in the automatic invocation (under jtreg) without bigfont.html file involvement. The only possible reason we may keep it (bigfont.html) for is - the test can be used in both the manual and automatic invocations. It include two methods runTest1() runTest2(). runTest2() is commented in the BigFont.java file as it's too risky to execute it in the automatic mode from the the applet environment. But it (runTest2()) is still valid for the manual invocation just for legacy/coverage reason to be executed under applet environment that is more challenging. As mentioned bigfont.html does not work in automatic invocation, but it can work if somebody decide to run the test manually (runTest2()) under applet environment. Thanks, Konstantin
Re: AWT Dev [8] Review request for 6868690 TEST: java/awt/FontClass/CreateFont/BigFont.java test should be modified in jdk78 to run via jtreg
Artem, I think there are two ways: 1) create one manual test with instructions to run applet (html) in browser + one automatic test without html. Method runTest2() should be used only within applet. 2) remove html and runTest2() method at all, so only one automatic test will remain. Konstantin On 08.06.2012 13:19, Artem Ananiev wrote: Hi, Konstantin, did you consider the following option: 1. Remove .html file 2. Add one more configuration: @run main BigFont test1 @run main/manual BigFont test1 test2 3. Update the main method, so it recognizes different command line args: for (String arg: args) if (arg.equalsIgnoreCase(test1) bigTest.runTest1(); else if (arg.equalsIgnoreCase(test2) bigTest.runTest2(); The reason I'm asking about that even for manual runs people still use jtreg, just passing -m to this script. As you have removed @run from the .html file, it will not be recognized by jtreg at all. Thanks, Artem On 6/4/2012 5:32 PM, Konstantin Shefov wrote: Hi, Artem As I have mentioned in review description, we can keep .html file and runTest2() method commented in the BigFont.java if somebody wishes to run it manually (e.g. when a failure happens). The .html file and the method were kept in openjdk 7 regression testsuite. Or you think we don't need to keep it? Konstantin On 04.06.2012 17:24, Artem Ananiev wrote: Hi, Konstantin, since you have replaced @run applet in .html with @run main in .java, does it also make sense to remove .html at all? Alternatively, you can keep the test as applet one, but mark it manual (@run applet/manual). BTW, copyright header dates should be updated to 2008, 2012, not 2008, 2011. Thanks, Artem On 5/31/2012 5:59 PM, Konstantin Shefov wrote: Hello, Please review a fix for the issue: 6868690 TEST: java/awt/FontClass/CreateFont/BigFont.java test should be modified in jdk78 to run via jtreg The webrev is http://cr.openjdk.java.net/~serb/6868690/webrev.00/ The test in the current state affects a whole session if it's executed under jtreg. It was fixed already by the implemented modifications in 1.7.0 that are used as a base for modifications applicable for 1.8.0 also. There is not risk are seen if the test be updated in jdk8 repo. The current fix is identical to already pushed fix for jdk 7. The test works in the automatic invocation (under jtreg) without bigfont.html file involvement. The only possible reason we may keep it (bigfont.html) for is - the test can be used in both the manual and automatic invocations. It include two methods runTest1() runTest2(). runTest2() is commented in the BigFont.java file as it's too risky to execute it in the automatic mode from the the applet environment. But it (runTest2()) is still valid for the manual invocation just for legacy/coverage reason to be executed under applet environment that is more challenging. As mentioned bigfont.html does not work in automatic invocation, but it can work if somebody decide to run the test manually (runTest2()) under applet environment. Thanks, Konstantin
Re: AWT Dev [8] Review request for 6868690 TEST: java/awt/FontClass/CreateFont/BigFont.java test should be modified in jdk78 to run via jtreg
Reminder: Hello, I have decided to remove bigfont.html and turn an applet test into main test, because applet test always fails with timeout. I have left method runTest2() commented because it requires rather large font file (included http://hg.openjdk.java.net/jdk8/awt/jdk/file/b57167b71169/test/java/awt/FontClass/CreateFont/A.ttf font is a small file). I have added fix for test/java/awt/FontClass/CreateFont/fileaccess/FontFile.java as it was done in jdk 7u4b11, and the test always passed with jdk 8 (it is also a part of bug 6868690). Here is the webrev: http://cr.openjdk.java.net/~kshefov/6868690/webrev.00/ http://cr.openjdk.java.net/%7Ekshefov/6868690/webrev.00/ Thanks, Konstantin On 08.06.2012 16:07, Artem Ananiev wrote: On 6/8/2012 12:54 PM, Konstantin Shefov wrote: Artem, I think there are two ways: 1) create one manual test with instructions to run applet (html) in browser + one automatic test without html. Method runTest2() should be used only within applet. OK, it can be implemented by having @run applet/manual in .html file, and @run main in .java file. Thanks, Artem 2) remove html and runTest2() method at all, so only one automatic test will remain. Konstantin On 08.06.2012 13:19, Artem Ananiev wrote: Hi, Konstantin, did you consider the following option: 1. Remove .html file 2. Add one more configuration: @run main BigFont test1 @run main/manual BigFont test1 test2 3. Update the main method, so it recognizes different command line args: for (String arg: args) if (arg.equalsIgnoreCase(test1) bigTest.runTest1(); else if (arg.equalsIgnoreCase(test2) bigTest.runTest2(); The reason I'm asking about that even for manual runs people still use jtreg, just passing -m to this script. As you have removed @run from the .html file, it will not be recognized by jtreg at all. Thanks, Artem On 6/4/2012 5:32 PM, Konstantin Shefov wrote: Hi, Artem As I have mentioned in review description, we can keep .html file and runTest2() method commented in the BigFont.java if somebody wishes to run it manually (e.g. when a failure happens). The .html file and the method were kept in openjdk 7 regression testsuite. Or you think we don't need to keep it? Konstantin On 04.06.2012 17:24, Artem Ananiev wrote: Hi, Konstantin, since you have replaced @run applet in .html with @run main in .java, does it also make sense to remove .html at all? Alternatively, you can keep the test as applet one, but mark it manual (@run applet/manual). BTW, copyright header dates should be updated to 2008, 2012, not 2008, 2011. Thanks, Artem On 5/31/2012 5:59 PM, Konstantin Shefov wrote: Hello, Please review a fix for the issue: 6868690 TEST: java/awt/FontClass/CreateFont/BigFont.java test should be modified in jdk78 to run via jtreg The webrev is http://cr.openjdk.java.net/~serb/6868690/webrev.00/ The test in the current state affects a whole session if it's executed under jtreg. It was fixed already by the implemented modifications in 1.7.0 that are used as a base for modifications applicable for 1.8.0 also. There is not risk are seen if the test be updated in jdk8 repo. The current fix is identical to already pushed fix for jdk 7. The test works in the automatic invocation (under jtreg) without bigfont.html file involvement. The only possible reason we may keep it (bigfont.html) for is - the test can be used in both the manual and automatic invocations. It include two methods runTest1() runTest2(). runTest2() is commented in the BigFont.java file as it's too risky to execute it in the automatic mode from the the applet environment. But it (runTest2()) is still valid for the manual invocation just for legacy/coverage reason to be executed under applet environment that is more challenging. As mentioned bigfont.html does not work in automatic invocation, but it can work if somebody decide to run the test manually (runTest2()) under applet environment. Thanks, Konstantin
Re: AWT Dev i18n dev Add some missing key maps
The patch is changing the code to always convert VK_KANA_LOCK to XK_Kana_Lock keysym. Does this work with Solaris? Looks like there are some piece of code that specifically handles KANA_LOCK. Naoto On 6/5/12 9:02 AM, Anthony Petrov wrote: Hi Charles, I'm not an expert in keyboard-related code, but the code changes look good to me. I think I18n team might want to take a look at the fix as well, so I'm CC'ing the i18n-dev@ mailing list. -- best regards, Anthony On 6/5/2012 7:19 AM, Charles Lee wrote: Hi awt-devs, There are some key map missing in the Japanese keyboard, for example: XK_Eisu_Shift, XK_Romaji, etc. I'd like to propose a patch @ http://cr.openjdk.java.net/~littlee/7174233/webrev.00/ http://cr.openjdk.java.net/%7Elittlee/7174233/webrev.00/ The patch is mainly about add these missing maps according to their means. Would anyone help to take a look at it? -- Yours Charles
Re: AWT Dev Request for review: updated 2 files to use generic type
This topic is more appropriate for 2d-dev@. I'm bcc'ing awt-dev@. -- best regards, Anthony On 06/18/12 06:48, Sean Chou wrote: Hello awt-dev guys, I updated 2 files(src/share/classes/sun/font/StrikeCache.java, src/share/classes/sun/java2d/Disposer.java) to use generic type, but I'm not sure if I modified too much. Especially I changed the return type of Disposer.getQueue from ReferenceQueue to ReferenceQueueObject . The webrev is: http://cr.openjdk.java.net/~zhouyx/OJDK-389/webrev.00/ The mail was sent to core-libs and there are some comments from David Homles and RĂ©mi Forax. http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-May/010103.html Please take a look. -- Best Regards, Sean Chou
Re: AWT Dev [8] Review request for 7124244: [macosx] Shaped windows support
Hi, Artem, Anthony. New version of the fix: http://cr.openjdk.java.net/~serb/7124244/webrev.01 13.06.2012 06:30, Artem Ananiev wrote: Hi, Sergey, a few minor comments: 1. There is no need in AWT_ASSERT_[NOT]_APPKIT_THREAD macros in CPlatformWindow.nativeRevalidateNSWindowShadow(), since there are corresponding checks just above. done. 2. invalidateShadow() is not used in sun.lwawt, so it can be just a method in CPlatformWindow. BTW, do you have any ideas, why CGLayer holds a reference to LWWindowPeer, not to CPlatformWindow? done. 3. As we don't expect isSwingBackbufferTranslucencySupported() to return different values, it would be fine to call it only once to avoid possible perf regressions. done. Thanks, Artem On 6/4/2012 7:49 PM, Sergey Bylokhov wrote: Hi Everyone, Please review the fix. Shaped window was implemented as a translucent window with constrained graphics. Now translucent window doesn't use separate BufferedImage as a back buffer. Also alpha value for the swing back buffer was enabled(Shared code changed). Note that shaped windows are affected by this bugs: http://monaco.us.oracle.com/detail.jsf?cr=7124236 - Shadows disappear. - Transparent areas aren't transparent to mouse clicks. http://monaco.sfbay.sun.com/detail.jsf?cr=7172431 - Opacity does not work for non opaque windows. Any suggestions are welcome. Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7124244 Webrev can be found at: http://cr.openjdk.java.net/~serb/7124244/webrev.00 -- Best regards, Sergey.
Re: AWT Dev [8] Review request for 7124244: [macosx] Shaped windows support
Hi Sergey, The fix looks good overall. Just two comments: 1. src/macosx/classes/sun/lwawt/LWWindowPeer.java 987 if (oldBB != null) { 988 backBuffer = (BufferedImage) platformWindow.createBackBuffer(); Since we never create a back buffer in JDK 8 currently, I suggest to comment this code out, and add a remark mentioning a CR number that should make use of the code in the future. 2. src/share/classes/javax/swing/RepaintManager.java 1501 Graphics2D g2d = (Graphics2D) osg.create(); 1502 g2d.setBackground(c.getBackground()); 1503 g2d.clearRect(x, y, bw, bh); 1504 g2d.dispose(); Please use the try {} finally {} pattern to dispose the G2D object. The same comment applies to the lines 1510-1513. -- best regards, Anthony On 06/25/12 14:42, Sergey Bylokhov wrote: Hi, Artem, Anthony. New version of the fix: http://cr.openjdk.java.net/~serb/7124244/webrev.01 13.06.2012 06:30, Artem Ananiev wrote: Hi, Sergey, a few minor comments: 1. There is no need in AWT_ASSERT_[NOT]_APPKIT_THREAD macros in CPlatformWindow.nativeRevalidateNSWindowShadow(), since there are corresponding checks just above. done. 2. invalidateShadow() is not used in sun.lwawt, so it can be just a method in CPlatformWindow. BTW, do you have any ideas, why CGLayer holds a reference to LWWindowPeer, not to CPlatformWindow? done. 3. As we don't expect isSwingBackbufferTranslucencySupported() to return different values, it would be fine to call it only once to avoid possible perf regressions. done. Thanks, Artem On 6/4/2012 7:49 PM, Sergey Bylokhov wrote: Hi Everyone, Please review the fix. Shaped window was implemented as a translucent window with constrained graphics. Now translucent window doesn't use separate BufferedImage as a back buffer. Also alpha value for the swing back buffer was enabled(Shared code changed). Note that shaped windows are affected by this bugs: http://monaco.us.oracle.com/detail.jsf?cr=7124236 - Shadows disappear. - Transparent areas aren't transparent to mouse clicks. http://monaco.sfbay.sun.com/detail.jsf?cr=7172431 - Opacity does not work for non opaque windows. Any suggestions are welcome. Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7124244 Webrev can be found at: http://cr.openjdk.java.net/~serb/7124244/webrev.00
AWT Dev hg: jdk8/awt/jdk: 7174718: [macosx] Regression in 7u6 b12: PopupFactory leaks DefaultFrames.
Changeset: cafcc94a11a7 Author:anthony Date: 2012-06-25 17:27 +0400 URL: http://hg.openjdk.java.net/jdk8/awt/jdk/rev/cafcc94a11a7 7174718: [macosx] Regression in 7u6 b12: PopupFactory leaks DefaultFrames. Summary: Fix memory management Reviewed-by: art, serb ! src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java ! src/macosx/native/sun/awt/AWTWindow.m
Re: AWT Dev [8] Review request for 7124244: [macosx] Shaped windows support
Hi, Artem, Anthony. New version of the fix: http://cr.openjdk.java.net/~serb/7124244/webrev.02/ 25.06.2012 06:02, Anthony Petrov wrote: Hi Sergey, The fix looks good overall. Just two comments: 1. src/macosx/classes/sun/lwawt/LWWindowPeer.java 987 if (oldBB != null) { 988 backBuffer = (BufferedImage) platformWindow.createBackBuffer(); Since we never create a back buffer in JDK 8 currently, I suggest to comment this code out, and add a remark mentioning a CR number that should make use of the code in the future. done 2. src/share/classes/javax/swing/RepaintManager.java 1501 Graphics2D g2d = (Graphics2D) osg.create(); 1502 g2d.setBackground(c.getBackground()); 1503 g2d.clearRect(x, y, bw, bh); 1504 g2d.dispose(); Please use the try {} finally {} pattern to dispose the G2D object. The same comment applies to the lines 1510-1513. fixed -- best regards, Anthony On 06/25/12 14:42, Sergey Bylokhov wrote: Hi, Artem, Anthony. New version of the fix: http://cr.openjdk.java.net/~serb/7124244/webrev.01 13.06.2012 06:30, Artem Ananiev wrote: Hi, Sergey, a few minor comments: 1. There is no need in AWT_ASSERT_[NOT]_APPKIT_THREAD macros in CPlatformWindow.nativeRevalidateNSWindowShadow(), since there are corresponding checks just above. done. 2. invalidateShadow() is not used in sun.lwawt, so it can be just a method in CPlatformWindow. BTW, do you have any ideas, why CGLayer holds a reference to LWWindowPeer, not to CPlatformWindow? done. 3. As we don't expect isSwingBackbufferTranslucencySupported() to return different values, it would be fine to call it only once to avoid possible perf regressions. done. Thanks, Artem On 6/4/2012 7:49 PM, Sergey Bylokhov wrote: Hi Everyone, Please review the fix. Shaped window was implemented as a translucent window with constrained graphics. Now translucent window doesn't use separate BufferedImage as a back buffer. Also alpha value for the swing back buffer was enabled(Shared code changed). Note that shaped windows are affected by this bugs: http://monaco.us.oracle.com/detail.jsf?cr=7124236 - Shadows disappear. - Transparent areas aren't transparent to mouse clicks. http://monaco.sfbay.sun.com/detail.jsf?cr=7172431 - Opacity does not work for non opaque windows. Any suggestions are welcome. Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7124244 Webrev can be found at: http://cr.openjdk.java.net/~serb/7124244/webrev.00 -- Best regards, Sergey.
Re: AWT Dev [8] Review request for 7124244: [macosx] Shaped windows support
Hi Sergey, Thanks for addressing the issues. The fix looks good to me. -- best regards, Anthony On 06/25/12 18:22, Sergey Bylokhov wrote: Hi, Artem, Anthony. New version of the fix: http://cr.openjdk.java.net/~serb/7124244/webrev.02/ 25.06.2012 06:02, Anthony Petrov wrote: Hi Sergey, The fix looks good overall. Just two comments: 1. src/macosx/classes/sun/lwawt/LWWindowPeer.java 987 if (oldBB != null) { 988 backBuffer = (BufferedImage) platformWindow.createBackBuffer(); Since we never create a back buffer in JDK 8 currently, I suggest to comment this code out, and add a remark mentioning a CR number that should make use of the code in the future. done 2. src/share/classes/javax/swing/RepaintManager.java 1501 Graphics2D g2d = (Graphics2D) osg.create(); 1502 g2d.setBackground(c.getBackground()); 1503 g2d.clearRect(x, y, bw, bh); 1504 g2d.dispose(); Please use the try {} finally {} pattern to dispose the G2D object. The same comment applies to the lines 1510-1513. fixed -- best regards, Anthony On 06/25/12 14:42, Sergey Bylokhov wrote: Hi, Artem, Anthony. New version of the fix: http://cr.openjdk.java.net/~serb/7124244/webrev.01 13.06.2012 06:30, Artem Ananiev wrote: Hi, Sergey, a few minor comments: 1. There is no need in AWT_ASSERT_[NOT]_APPKIT_THREAD macros in CPlatformWindow.nativeRevalidateNSWindowShadow(), since there are corresponding checks just above. done. 2. invalidateShadow() is not used in sun.lwawt, so it can be just a method in CPlatformWindow. BTW, do you have any ideas, why CGLayer holds a reference to LWWindowPeer, not to CPlatformWindow? done. 3. As we don't expect isSwingBackbufferTranslucencySupported() to return different values, it would be fine to call it only once to avoid possible perf regressions. done. Thanks, Artem On 6/4/2012 7:49 PM, Sergey Bylokhov wrote: Hi Everyone, Please review the fix. Shaped window was implemented as a translucent window with constrained graphics. Now translucent window doesn't use separate BufferedImage as a back buffer. Also alpha value for the swing back buffer was enabled(Shared code changed). Note that shaped windows are affected by this bugs: http://monaco.us.oracle.com/detail.jsf?cr=7124236 - Shadows disappear. - Transparent areas aren't transparent to mouse clicks. http://monaco.sfbay.sun.com/detail.jsf?cr=7172431 - Opacity does not work for non opaque windows. Any suggestions are welcome. Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7124244 Webrev can be found at: http://cr.openjdk.java.net/~serb/7124244/webrev.00
Re: AWT Dev [8] Review request for 7124244: [macosx] Shaped windows support
Hi, Sergey, a few minor comments: 1. CPlatformWindow.java: invalidateShadow() in native is ready to be called on any thread, so what's the reason behind invokeLater() here? 2. RepaintManager.java: the new field should better be named volatileBufferType. 3. LWComponentPeer.applyShape() is a peer method, which accepts user-supplied object (right now it's constructed from Shape in AWT internal code, but nothing prevents users from calling this method directly), so it should be stored as a copy, not as a reference. Thanks, Artem On 6/25/2012 2:42 PM, Sergey Bylokhov wrote: Hi, Artem, Anthony. New version of the fix: http://cr.openjdk.java.net/~serb/7124244/webrev.01 13.06.2012 06:30, Artem Ananiev wrote: Hi, Sergey, a few minor comments: 1. There is no need in AWT_ASSERT_[NOT]_APPKIT_THREAD macros in CPlatformWindow.nativeRevalidateNSWindowShadow(), since there are corresponding checks just above. done. 2. invalidateShadow() is not used in sun.lwawt, so it can be just a method in CPlatformWindow. BTW, do you have any ideas, why CGLayer holds a reference to LWWindowPeer, not to CPlatformWindow? done. 3. As we don't expect isSwingBackbufferTranslucencySupported() to return different values, it would be fine to call it only once to avoid possible perf regressions. done. Thanks, Artem On 6/4/2012 7:49 PM, Sergey Bylokhov wrote: Hi Everyone, Please review the fix. Shaped window was implemented as a translucent window with constrained graphics. Now translucent window doesn't use separate BufferedImage as a back buffer. Also alpha value for the swing back buffer was enabled(Shared code changed). Note that shaped windows are affected by this bugs: http://monaco.us.oracle.com/detail.jsf?cr=7124236 - Shadows disappear. - Transparent areas aren't transparent to mouse clicks. http://monaco.sfbay.sun.com/detail.jsf?cr=7172431 - Opacity does not work for non opaque windows. Any suggestions are welcome. Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7124244 Webrev can be found at: http://cr.openjdk.java.net/~serb/7124244/webrev.00
Re: AWT Dev [8] Review request for 7142091: [macosx] RFE: Refactoring of peer initialization/disposing
Hi, Sergey, this version looks fine. Thanks, Artem On 6/21/2012 2:42 PM, Sergey Bylokhov wrote: Hello, new version of the fix: http://cr.openjdk.java.net/~serb/7142091/webrev.01/ - invokeLater was removed from setVisible and dispose. - instanceof Graphics2D was added. Run some awt related jck and regression tests, no new issues found. On 18.06.2012 19:13, Artem Ananiev wrote: Hi, Sergey, some minor comments (may be unrelated to the fix): 1. LWComponentPeer.setVisible() can be made final. Do expect any subclass to override it instead of setVisibleImpl()? It is overriden in CPrinterDialogPeer. 2. invokeLater() in LWWindowPeer.setVisibleImpl(): I realize this is really painful issue, but I'd vote for removing this workaround. It would result in faster startup (although, the window will be solid gray for some time), and make LWAWT code similar to what we have on other platforms. removed Then next step will to minimize the delay between showing the window and painting its content. 3. LWWindowPeer.replaceSurfaceData(): what are benefits of setBackground() + clearRect() over setColor() + fillRect()? Although we always expect the Graphics object to be Graphics2D instance, this unconditional cast doesn't look great. done Thanks, Artem On 5/31/2012 5:43 PM, Sergey Bylokhov wrote: Hi Everyone, Please review the fix. Notes from the bug and comments: 1. setVisible() should be called at the end of the peers initialization. We can move super.initialize() to the end of the peers initializations. Initialize() was split to initialize() and initializeImpl(). In the initialize() we call initializeImpl and then we call to setVisible(). initializeImpl overridden in subclasses. 2. Invokelater in the initialization/disposing is a tricky. Left it as is. Probably later it will be changed. Comments was updated. 3. replaceSurfacedata() should be moved outside of LWWindowPeer.setVisible() Done. Also duplicate code was extracted to setVisible() method which call setVisibleImpl(). 4. Backbuffer in replaceSurfacedata() should be initialized by clearRect instead of fillrect(composite is important). Done. related to composite. 5. During lwwindowpeer initialization we call two similar methods nativeSetNSWindowAlpha() and setAlphaValue(). nativeSetNSWindowAlpha() removed from CPlatformWindow.java. Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7142091 Webrev can be found at: http://cr.openjdk.java.net/~serb/7142091/webrev.00/
Re: AWT Dev [8] Review request for 7124244: [macosx] Shaped windows support
Hi, Artem. New version of the fix. http://cr.openjdk.java.net/~serb/7124244/webrev.03/ 25.06.2012 08:16, Artem Ananiev wrote: Hi, Sergey, a few minor comments: 1. CPlatformWindow.java: invalidateShadow() in native is ready to be called on any thread, so what's the reason behind invokeLater() here? It is used to postpone shadow invalidating. 2. RepaintManager.java: the new field should better be named volatileBufferType. done 3. LWComponentPeer.applyShape() is a peer method, which accepts user-supplied object (right now it's constructed from Shape in AWT internal code, but nothing prevents users from calling this method directly), so it should be stored as a copy, not as a reference. done Thanks, Artem On 6/25/2012 2:42 PM, Sergey Bylokhov wrote: Hi, Artem, Anthony. New version of the fix: http://cr.openjdk.java.net/~serb/7124244/webrev.01 13.06.2012 06:30, Artem Ananiev wrote: Hi, Sergey, a few minor comments: 1. There is no need in AWT_ASSERT_[NOT]_APPKIT_THREAD macros in CPlatformWindow.nativeRevalidateNSWindowShadow(), since there are corresponding checks just above. done. 2. invalidateShadow() is not used in sun.lwawt, so it can be just a method in CPlatformWindow. BTW, do you have any ideas, why CGLayer holds a reference to LWWindowPeer, not to CPlatformWindow? done. 3. As we don't expect isSwingBackbufferTranslucencySupported() to return different values, it would be fine to call it only once to avoid possible perf regressions. done. Thanks, Artem On 6/4/2012 7:49 PM, Sergey Bylokhov wrote: Hi Everyone, Please review the fix. Shaped window was implemented as a translucent window with constrained graphics. Now translucent window doesn't use separate BufferedImage as a back buffer. Also alpha value for the swing back buffer was enabled(Shared code changed). Note that shaped windows are affected by this bugs: http://monaco.us.oracle.com/detail.jsf?cr=7124236 - Shadows disappear. - Transparent areas aren't transparent to mouse clicks. http://monaco.sfbay.sun.com/detail.jsf?cr=7172431 - Opacity does not work for non opaque windows. Any suggestions are welcome. Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7124244 Webrev can be found at: http://cr.openjdk.java.net/~serb/7124244/webrev.00 -- Best regards, Sergey.
Re: AWT Dev [8] Review request for 7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
Hi guys, indeed this is for 7u6. Be happy if you review that by tomorrow evening. Thanks, Oleg 6/22/2012 8:28 PM, Oleg Pekhovskiy wrote: Hi, Please review the second version of fix for CR: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7024749 Webrev: http://cr.openjdk.java.net/~bagiras/8/7024749.2 It resolves applet's IME typing problems that existed with the first fix. Here are my answers to Artem's comments: 1. I see no reason to change ImmGetContext() to ImmGetHWnd(). Everywhere in the code ImmGetHWnd() is followed by ImmGetContext(), and these two calls can easily be combined into a single method in AwtComponent. ImmGetHWnd() ImmGetContext() return HWND and HIMC accordingly that are used BOTH in ImmReleaseContext(). 2. Comment about focus proxy in AwtComponent::OpenCandidateWindow() is now obsolete. Instead, you need to add a comment why we send WM_IME_NOTIFY to this component (GetHWnd()), not to its focus proxy. It's not obsolete now, because I returned GetProxyFocusOwner() there. 3. There is no need to call ImmReleaseContext() if hIMC is NULL in AwtComponent::WmImeSetContext(). Thanks, I changed that. 4. In WM_ACTIVATE handler, I would first handle WM_IME_ENDCOMPOSITION, then call ImmReleaseContext(). Seems like it would be better to release IMM Context for avoiding its simultaneous usage. 5. In the same WM_ACTIVATE handler, what's the reason of direct call to DefWindowProc() instead of regular ::SendMessage()? It's not my code, so I left that as is. PS: this fix leads to the regression for 'test/java/awt/Focus/AppletInitialFocusTest', but I was not able to fix that yet (ready to file a separate CR). Thanks, Oleg