Re: JavaFX graphics performance

2017-04-10 Thread Kevin Rushforth
We are planning some performance improvements in JDK 10, mostly in the 
areas of CSS and layout. If you have specific concerns in other areas we 
could look into them. Having a specific test case that shows a 
performance problem would be a good start.


-- Kevin


Michael Paus wrote:

Hi,

more and more people ask me why I am still doing GUI development in 
JavaFX instead
of following the  mainstream and use some web technology. One of the 
arguments
I could use in the past was performance but nowadays this does not 
seem to be such
a valid argument anymore. Web technologies are catching up quickly and 
JavaFX currently
has not much to offer here. Actually the general drawing performance 
is very bad compared
to what is in principle possible with a modern GPU. I even tried to 
use a TriangleMesh
to better exploit the graphics hardware but this approach is also 
limited by the fact that
a TrinangleMesh has an excessive memory usage (about 60 times its 
nominal memory
consumption). I would therefore like to ask whether there are already 
any plans for Java 10

to improve this situation?

Michael


Re: Canvas Content Shift

2017-04-10 Thread Jim Graham

Any suggestions on how to implement this when the size of pixels may be an 
arbitrary non-integer number?

Consider rendering on a 125% scaled Windows 10 screen.  If you want to scroll by 2 pixels you would want to scroll by 
1.6 coordinate units.  If you want to scroll by 2 coordinate units you are out of luck because that would attempt to 
"scroll by 2.5 pixels" and there is no good definition of that type of operation.


We could add a pixel size parameter (note that it might be different than the window or screen render scale because the 
Canvas cannot re-render and so it chooses the scale of the deepest screen).  Then it would be up to the developer to 
take this into account when determining how far to scroll, but that is a bit more complicated than what developers tend 
to be used to when they deal with scrolling.


Note that the scrolling of JViewport is handled by our own code, not developer code, so we can take these adjustments 
into account ourselves internally and know if/when we can blit or if/when we need to re-render...


...jim

On 4/10/17 1:32 AM, Dirk Lemmermann wrote:

HI there,

I was wondering if there is any chance that Java 10 could implement some sort 
of „content shifting“ for the Canvas API?

I would love to have this feature for supporting faster horizontal scrolling in 
my Gantt Chart framework FlexGanttFX. Currently when the user scrolls then the 
entire content of each canvas in each row of the chart will be redrawn. This 
could be optimized by only drawing the time range that has been moved into the 
„viewport“ and by shifting or copying the remaining time range graphics. E.g. 
the user currently looks at one week and scrolls one day to the right then the 
data / graphics of 6 days would stay the same and could just be reused. Only 
one day worth of data would need to be redrawn.

I think in Swing this is comparable with the BLIT_SCROLL_MODE of JViewport.

Dirk



Review Request: JDK-8175963: ChoiceBox using events from ComboBox

2017-04-10 Thread Ambarish Rapte
Hi Jonathan, Ajit,

 

Please review this fix,

Bug : https://bugs.openjdk.java.net/browse/JDK-8175963
Webrev: http://cr.openjdk.java.net/~arapte/fx/8175963/webrev.03/

 

 

Issue:
EventType  from class ComboBoxBase were used with ChoiceBox class in method  
ChoiceBox.setShowing().

Fix:
Corrected the EventType in ChoiceBox.setShowing() & added a test.
Similar changes are done for MenuButton


Verification: 
Verified the :controls:test. This change does not cause any failure.

 

 

Regards,

Ambarish

 


JavaFX graphics performance

2017-04-10 Thread Michael Paus

Hi,

more and more people ask me why I am still doing GUI development in 
JavaFX instead
of following the  mainstream and use some web technology. One of the 
arguments
I could use in the past was performance but nowadays this does not seem 
to be such
a valid argument anymore. Web technologies are catching up quickly and 
JavaFX currently
has not much to offer here. Actually the general drawing performance is 
very bad compared
to what is in principle possible with a modern GPU. I even tried to use 
a TriangleMesh
to better exploit the graphics hardware but this approach is also 
limited by the fact that
a TrinangleMesh has an excessive memory usage (about 60 times its 
nominal memory
consumption). I would therefore like to ask whether there are already 
any plans for Java 10

to improve this situation?

Michael


Re: Canvas Content Shift

2017-04-10 Thread Dirk Lemmermann
I have submitted the RFE.

— Dirk

> Am 10.04.2017 um 16:54 schrieb Kevin Rushforth :
> 
> Please file an Enhancement request and we can consider this for JDK 10.
> 
> Dirk Lemmermann wrote:
>> 
>> +1 on Java 8/9 update. But I have a feeling that will be hard to accomplish.
>>   
> 
> Indeed it will be. We have a general policy against further enhancements for 
> JDK 8uNN. I suspect the same is likely for JDK 9.x, but I can't say that for 
> sure until there is a JDK 9 updates project.
> 
> -- Kevin
> 
>>   
>>> Am 10.04.2017 um 11:20 schrieb Michael Paus  
>>> :
>>> 
>>> I also have that on my wishlist. Actually I would like to see that in some 
>>> update release for Java 8/9 too
>>> because Java 10 is still very far away at the horizon.
>>> Michael
>>> 
>>> Am 10.04.17 um 10:32 schrieb Dirk Lemmermann:
>>> 
 HI there,
 
 I was wondering if there is any chance that Java 10 could implement some 
 sort of „content shifting“ for the Canvas API?
 
 I would love to have this feature for supporting faster horizontal 
 scrolling in my Gantt Chart framework FlexGanttFX. Currently when the user 
 scrolls then the entire content of each canvas in each row of the chart 
 will be redrawn. This could be optimized by only drawing the time range 
 that has been moved into the „viewport“ and by shifting or copying the 
 remaining time range graphics. E.g. the user currently looks at one week 
 and scrolls one day to the right then the data / graphics of 6 days would 
 stay the same and could just be reused. Only one day worth of data would 
 need to be redrawn.
 
 I think in Swing this is comparable with the BLIT_SCROLL_MODE of JViewport.
 
 Dirk
 
   
>> 
>>   



Re: Canvas Content Shift

2017-04-10 Thread Kevin Rushforth

Please file an Enhancement request and we can consider this for JDK 10.

Dirk Lemmermann wrote:

+1 on Java 8/9 update. But I have a feeling that will be hard to accomplish.
  


Indeed it will be. We have a general policy against further enhancements 
for JDK 8uNN. I suspect the same is likely for JDK 9.x, but I can't say 
that for sure until there is a JDK 9 updates project.


-- Kevin

  

Am 10.04.2017 um 11:20 schrieb Michael Paus :

I also have that on my wishlist. Actually I would like to see that in some 
update release for Java 8/9 too
because Java 10 is still very far away at the horizon.
Michael

Am 10.04.17 um 10:32 schrieb Dirk Lemmermann:


HI there,

I was wondering if there is any chance that Java 10 could implement some sort 
of „content shifting“ for the Canvas API?

I would love to have this feature for supporting faster horizontal scrolling in 
my Gantt Chart framework FlexGanttFX. Currently when the user scrolls then the 
entire content of each canvas in each row of the chart will be redrawn. This 
could be optimized by only drawing the time range that has been moved into the 
„viewport“ and by shifting or copying the remaining time range graphics. E.g. 
the user currently looks at one week and scrolls one day to the right then the 
data / graphics of 6 days would stay the same and could just be reused. Only 
one day worth of data would need to be redrawn.

I think in Swing this is comparable with the BLIT_SCROLL_MODE of JViewport.

Dirk

  


  


Review request: JDK-8145887: ListView selectionModel selectedIndices ListIterator nextIndex broken

2017-04-10 Thread Ambarish Rapte
Hi Jonathan, Ajit

 

Please review this fix:

Webrev : 
http://cr.openjdk.java.net/~arapte/fx/8145887/webrev.00/

Bug : https://bugs.openjdk.java.net/browse/JDK-8145887

 

Issue:

The private class SelectionListIterator implements the interface 
java.util.ListIterator.
But the class SelectionListIterator does not follow specifications of 
java.util.ListIterator. 
 

Fix:
Updated the required SelectionListIteratorclas  class APIs as per the 
specification of interface java.util.ListIterator.

https://docs.oracle.com/javase/8/docs/api/java/util/ListIterator.html

 

Verification:
Verified that no controls test fails due to this change.

 

 

Regards,

Ambarish

 


Re: Canvas Content Shift

2017-04-10 Thread Dirk Lemmermann
+1 on Java 8/9 update. But I have a feeling that will be hard to accomplish.

> Am 10.04.2017 um 11:20 schrieb Michael Paus :
> 
> I also have that on my wishlist. Actually I would like to see that in some 
> update release for Java 8/9 too
> because Java 10 is still very far away at the horizon.
> Michael
> 
> Am 10.04.17 um 10:32 schrieb Dirk Lemmermann:
>> HI there,
>> 
>> I was wondering if there is any chance that Java 10 could implement some 
>> sort of „content shifting“ for the Canvas API?
>> 
>> I would love to have this feature for supporting faster horizontal scrolling 
>> in my Gantt Chart framework FlexGanttFX. Currently when the user scrolls 
>> then the entire content of each canvas in each row of the chart will be 
>> redrawn. This could be optimized by only drawing the time range that has 
>> been moved into the „viewport“ and by shifting or copying the remaining time 
>> range graphics. E.g. the user currently looks at one week and scrolls one 
>> day to the right then the data / graphics of 6 days would stay the same and 
>> could just be reused. Only one day worth of data would need to be redrawn.
>> 
>> I think in Swing this is comparable with the BLIT_SCROLL_MODE of JViewport.
>> 
>> Dirk
>> 
> 



Re: Canvas Content Shift

2017-04-10 Thread Michael Paus
I also have that on my wishlist. Actually I would like to see that in 
some update release for Java 8/9 too

because Java 10 is still very far away at the horizon.
Michael

Am 10.04.17 um 10:32 schrieb Dirk Lemmermann:

HI there,

I was wondering if there is any chance that Java 10 could implement some sort 
of „content shifting“ for the Canvas API?

I would love to have this feature for supporting faster horizontal scrolling in 
my Gantt Chart framework FlexGanttFX. Currently when the user scrolls then the 
entire content of each canvas in each row of the chart will be redrawn. This 
could be optimized by only drawing the time range that has been moved into the 
„viewport“ and by shifting or copying the remaining time range graphics. E.g. 
the user currently looks at one week and scrolls one day to the right then the 
data / graphics of 6 days would stay the same and could just be reused. Only 
one day worth of data would need to be redrawn.

I think in Swing this is comparable with the BLIT_SCROLL_MODE of JViewport.

Dirk





Canvas Content Shift

2017-04-10 Thread Dirk Lemmermann
HI there,

I was wondering if there is any chance that Java 10 could implement some sort 
of „content shifting“ for the Canvas API? 

I would love to have this feature for supporting faster horizontal scrolling in 
my Gantt Chart framework FlexGanttFX. Currently when the user scrolls then the 
entire content of each canvas in each row of the chart will be redrawn. This 
could be optimized by only drawing the time range that has been moved into the 
„viewport“ and by shifting or copying the remaining time range graphics. E.g. 
the user currently looks at one week and scrolls one day to the right then the 
data / graphics of 6 days would stay the same and could just be reused. Only 
one day worth of data would need to be redrawn.

I think in Swing this is comparable with the BLIT_SCROLL_MODE of JViewport.

Dirk